From 2d9bf2570de44db92f1ea9788e926581d42343be Mon Sep 17 00:00:00 2001 From: Kasun Date: Mon, 5 Aug 2019 12:42:58 +0530 Subject: [PATCH 1/2] some changes to fake actionbar --- .../activities/ShowAccountActivity.java | 6 +- .../layout-sw600dp/activity_show_account.xml | 63 +++++++++---------- .../main/res/layout/activity_show_account.xml | 58 ++++++++--------- 3 files changed, 65 insertions(+), 62 deletions(-) diff --git a/app/src/main/java/app/fedilab/android/activities/ShowAccountActivity.java b/app/src/main/java/app/fedilab/android/activities/ShowAccountActivity.java index 4e32728a5..b9bf22986 100644 --- a/app/src/main/java/app/fedilab/android/activities/ShowAccountActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/ShowAccountActivity.java @@ -240,15 +240,19 @@ public class ShowAccountActivity extends BaseActivity implements OnPostActionInt } }); - + View fake_actionbar = findViewById(R.id.fake_actionbar); final ImageButton account_menu = findViewById(R.id.account_menu); ImageButton action_more = findViewById(R.id.action_more); ImageButton action_back = findViewById(R.id.action_back); if(theme == Helper.THEME_LIGHT){ + fake_actionbar.setBackgroundColor(ContextCompat.getColor(ShowAccountActivity.this, R.color.light_grey)); changeDrawableColor(getApplicationContext(),action_more,R.color.dark_icon); changeDrawableColor(getApplicationContext(),account_menu,R.color.dark_icon); changeDrawableColor(getApplicationContext(),action_back,R.color.dark_icon); } + if(theme == THEME_BLACK){ + fake_actionbar.setBackgroundColor(ContextCompat.getColor(ShowAccountActivity.this, R.color.light_black)); + } account_menu.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { diff --git a/app/src/main/res/layout-sw600dp/activity_show_account.xml b/app/src/main/res/layout-sw600dp/activity_show_account.xml index 41eb10d51..68993164b 100644 --- a/app/src/main/res/layout-sw600dp/activity_show_account.xml +++ b/app/src/main/res/layout-sw600dp/activity_show_account.xml @@ -93,39 +93,38 @@ android:visibility="gone" app:layout_constraintStart_toEndOf="@id/account_pp" app:layout_constraintTop_toBottomOf="@id/banner_pp" /> - - - - + + + + + diff --git a/app/src/main/res/layout/activity_show_account.xml b/app/src/main/res/layout/activity_show_account.xml index 0fcadcf50..7d973622c 100644 --- a/app/src/main/res/layout/activity_show_account.xml +++ b/app/src/main/res/layout/activity_show_account.xml @@ -94,39 +94,39 @@ app:layout_constraintStart_toEndOf="@id/account_pp" app:layout_constraintTop_toBottomOf="@id/banner_pp" /> - - - - - + app:layout_constraintTop_toTopOf="parent" /> + + From 13477d6153e207c77a8c9828c7aaed837cc094fb Mon Sep 17 00:00:00 2001 From: Kasun Date: Mon, 5 Aug 2019 14:29:21 +0530 Subject: [PATCH 2/2] add default banner --- app/src/main/res/drawable/default_banner.xml | 10 ++++++++++ .../main/res/layout-sw600dp/activity_show_account.xml | 1 + app/src/main/res/layout/activity_show_account.xml | 1 + 3 files changed, 12 insertions(+) create mode 100644 app/src/main/res/drawable/default_banner.xml diff --git a/app/src/main/res/drawable/default_banner.xml b/app/src/main/res/drawable/default_banner.xml new file mode 100644 index 000000000..90a7e8f63 --- /dev/null +++ b/app/src/main/res/drawable/default_banner.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/layout-sw600dp/activity_show_account.xml b/app/src/main/res/layout-sw600dp/activity_show_account.xml index 68993164b..3763bfe49 100644 --- a/app/src/main/res/layout-sw600dp/activity_show_account.xml +++ b/app/src/main/res/layout-sw600dp/activity_show_account.xml @@ -53,6 +53,7 @@ android:layout_height="@dimen/layout_height_header" android:contentDescription="@string/profile_banner" android:scaleType="centerCrop" + android:src="@drawable/default_banner" app:layout_collapseMode="parallax" app:layout_constraintTop_toTopOf="parent" /> diff --git a/app/src/main/res/layout/activity_show_account.xml b/app/src/main/res/layout/activity_show_account.xml index 7d973622c..f63186f23 100644 --- a/app/src/main/res/layout/activity_show_account.xml +++ b/app/src/main/res/layout/activity_show_account.xml @@ -52,6 +52,7 @@ android:layout_height="@dimen/layout_height_header" android:contentDescription="@string/profile_banner" android:scaleType="centerCrop" + android:src="@drawable/default_banner" app:layout_collapseMode="parallax" app:layout_constraintTop_toTopOf="parent" />