Remove action bar/tool bar hard-coded colors

This commit is contained in:
Shinokuni 2019-09-28 12:59:12 +02:00
parent 55e900bb22
commit c097a454bf
7 changed files with 7 additions and 22 deletions

View File

@ -2,7 +2,6 @@ package com.readrops.app.activities;
import android.content.Intent;
import android.content.res.ColorStateList;
import android.graphics.Color;
import android.net.Uri;
import android.os.Bundle;
import android.view.Menu;
@ -86,12 +85,9 @@ public class ItemActivity extends AppCompatActivity {
toolbarLayout.setTitleEnabled(false);
scrim.setVisibility(View.GONE);
toolbar.setTitleTextColor(Color.WHITE);
} else {
appBarLayout.setExpanded(true);
toolbarLayout.setTitleEnabled(true);
toolbarLayout.setExpandedTitleColor(Color.WHITE);
toolbarLayout.setCollapsedTitleTextColor(Color.WHITE);
GlideApp.with(this)
.load(imageUrl)
@ -126,7 +122,6 @@ public class ItemActivity extends AppCompatActivity {
if (itemWithFeed.getFolder() != null) {
toolbar.setSubtitle(itemWithFeed.getFolder().getName());
toolbar.setSubtitleTextColor(Color.WHITE);
}
title.setText(item.getTitle());

View File

@ -111,7 +111,6 @@ public class MainActivity extends AppCompatActivity implements SwipeRefreshLayou
toolbar = findViewById(R.id.toolbar_main);
setSupportActionBar(toolbar);
toolbar.setTitleTextColor(Color.WHITE);
emptyListLayout = findViewById(R.id.empty_list_layout);
refreshLayout = findViewById(R.id.swipe_refresh_layout);

View File

@ -1,6 +1,5 @@
package com.readrops.app.activities;
import android.graphics.Color;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
@ -16,8 +15,8 @@ import androidx.viewpager.widget.ViewPager;
import com.afollestad.materialdialogs.MaterialDialog;
import com.readrops.app.R;
import com.readrops.app.database.entities.account.Account;
import com.readrops.app.database.entities.Folder;
import com.readrops.app.database.entities.account.Account;
import com.readrops.app.databinding.ActivityManageFeedsFoldersBinding;
import com.readrops.app.fragments.FeedsFragment;
import com.readrops.app.fragments.FoldersFragment;
@ -47,9 +46,6 @@ public class ManageFeedsFoldersActivity extends AppCompatActivity {
setSupportActionBar(binding.manageFeedsFoldersToolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
binding.manageFeedsFoldersToolbar.setTitleTextColor(Color.WHITE);
binding.manageFeedsFoldersTablayout.setTabTextColors(Color.WHITE, Color.WHITE);
account = getIntent().getParcelableExtra(ACCOUNT);
pageAdapter = new FeedsFoldersPageAdapter(getSupportFragmentManager());

View File

@ -11,7 +11,7 @@
android:id="@+id/app_bar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/Widget.AppCompat.Light.ActionBar">
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/collapsing_layout"
@ -38,9 +38,7 @@
android:id="@+id/collapsing_layout_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:theme="@style/AlertDialog.AppCompat.Light"
app:layout_collapseMode="pin"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
app:layout_collapseMode="pin" />
</com.google.android.material.appbar.CollapsingToolbarLayout>

View File

@ -18,7 +18,7 @@
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" />
<RelativeLayout
android:id="@+id/sync_progress_layout"

View File

@ -12,16 +12,13 @@
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme">
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<androidx.appcompat.widget.Toolbar
android:id="@+id/manage_feeds_folders_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/colorPrimary"
android:theme="@style/AppTheme"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/AppTheme" />
app:layout_scrollFlags="scroll|enterAlways" />
<com.google.android.material.tabs.TabLayout
android:id="@+id/manage_feeds_folders_tablayout"

View File

@ -11,7 +11,7 @@
<item name="android:textColorPrimary">@color/textColorPrimary</item>
</style>
<style name="AppTheme.NoActionBar">
<style name="AppTheme.NoActionBar" parent="AppTheme">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="windowActionModeOverlay">true</item>