Мое приложение имеет проблемы, в частности, из-за неправильной работы панели инструментов и строк состояния. Я хочу, чтобы моя панель инструментов и строка состояния были одинакового цвета для плавного слияния. Кроме того, я хотел бы, чтобы название деятельности отображалось на ярлыке для всех действий. Для некоторых видов деятельности это отлично работает. Например, основной вид деятельности:
![enter image description here](https://i.stack.imgur.com/EkIgB.png)
Однако все действия, за исключением основного действия, не позволяют отображать метку, и только основное действие и действие представителей показывают правильную цветовую конфигурацию. Например, панель инструментов «Представители» имеет правильную цветовую комбинацию, но не имеет метки.
![enter image description here](https://i.stack.imgur.com/1FQeT.png)
Другие виды деятельности не имеют правильной цветовой комбинации или ярлыка, например «Единый представитель»
![enter image description here](https://i.stack.imgur.com/FiFSP.png)
Вот мой манифест Android
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.gabe.politicianspulse">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".VoterInformation"
android:label="@string/title_activity_voter_information"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".Representatives"
android:label="Representatives"
android:theme="@style/AppTheme.NoActionBar" />
<activity android:name=".SingleRepresentative"
android:label="@string/title_activity_single_representative"
android:theme="@style/AppTheme.NoActionBar"
/>
<activity android:name=".Elections"
android:label="@string/elections"
android:theme="@style/AppTheme.NoActionBar"
/>
<activity android:name=".SingleElection"
tools:ignore="ExtraText"
android:label="@string/elections"
android:theme="@style/AppTheme.NoActionBar"
>
</activity>
</application>
Код панели инструментов:
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<android.support.v7.widget.Toolbar
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimaryDark"
android:id="@+id/toolbar"
app:titleTextColor="#ffffff">
</android.support.v7.widget.Toolbar>
colors.xml:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#ffffff</color>
<color name="colorPrimaryDark">#2F3C4B</color>
<color name="colorAccent">#CC4848</color>
</resources>
Я могу доставить любой код Java или XML из любого вида деятельности по запросу. Спасибо за помощь!
-Gabe