some changes to fake actionbar

This commit is contained in:
Kasun 2019-08-05 12:42:58 +05:30
parent 1c9627c8a2
commit 2d9bf2570d
3 changed files with 65 additions and 62 deletions

View File

@ -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) {

View File

@ -93,39 +93,38 @@
android:visibility="gone"
app:layout_constraintStart_toEndOf="@id/account_pp"
app:layout_constraintTop_toBottomOf="@id/banner_pp" />
<RelativeLayout
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_width="match_parent"
android:background="@color/black"
android:alpha="0.5"
android:layout_height="wrap_content"
>
<ImageButton
android:id="@+id/action_back"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginTop="5dp"
android:layout_marginEnd="10dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/go_back"
android:src="@drawable/ic_back"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/account_menu"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginTop="5dp"
android:layout_marginEnd="10dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/open_menu"
android:src="@drawable/ic_more_vert"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</RelativeLayout>
<View
android:id="@+id/fake_actionbar"
android:layout_width="match_parent"
android:layout_height="50dp"
android:alpha="0.4"
android:background="@color/black"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/action_back"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginTop="5dp"
android:layout_marginEnd="10dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/go_back"
android:src="@drawable/ic_back"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/account_menu"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginTop="5dp"
android:layout_marginEnd="10dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/open_menu"
android:src="@drawable/ic_more_vert"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -94,39 +94,39 @@
app:layout_constraintStart_toEndOf="@id/account_pp"
app:layout_constraintTop_toBottomOf="@id/banner_pp" />
<RelativeLayout
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
<View
android:id="@+id/fake_actionbar"
android:layout_width="match_parent"
android:layout_height="50dp"
android:alpha="0.4"
android:background="@color/black"
android:alpha="0.5"
android:layout_height="wrap_content"
>
<ImageButton
android:id="@+id/action_back"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginTop="5dp"
android:layout_marginEnd="10dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/go_back"
android:src="@drawable/ic_back"
android:layout_alignParentStart="true" />
<ImageButton
android:id="@+id/account_menu"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginTop="5dp"
android:layout_marginEnd="10dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/open_menu"
android:src="@drawable/ic_more_vert"
android:layout_alignParentEnd="true" />
</RelativeLayout>
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/action_back"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentStart="true"
android:layout_marginTop="5dp"
android:layout_marginEnd="10dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/go_back"
android:src="@drawable/ic_back"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/account_menu"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentEnd="true"
android:layout_marginTop="5dp"
android:layout_marginEnd="10dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/open_menu"
android:src="@drawable/ic_more_vert"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>