Fixes an issue in light mode & header profile picture
This commit is contained in:
parent
612b97a43b
commit
f866da4cc4
|
@ -1195,6 +1195,12 @@ public class Helper {
|
|||
if( urlHeader.startsWith("/") ){
|
||||
urlHeader = Helper.getLiveInstanceWithProtocol(activity) + account.getHeader();
|
||||
}
|
||||
LinearLayout main_header_container = headerLayout.findViewById(R.id.main_header_container);
|
||||
final SharedPreferences sharedpreferences = activity.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
||||
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
|
||||
if( theme == Helper.THEME_LIGHT){
|
||||
main_header_container.setBackgroundDrawable( activity.getResources().getDrawable(R.drawable.side_nav_bar_dark));
|
||||
}
|
||||
if (!urlHeader.contains("missing.png")) {
|
||||
Glide.with(activity.getApplicationContext())
|
||||
.asBitmap()
|
||||
|
@ -1211,15 +1217,6 @@ public class Helper {
|
|||
}
|
||||
}
|
||||
});
|
||||
}else {
|
||||
LinearLayout main_header_container = headerLayout.findViewById(R.id.main_header_container);
|
||||
final SharedPreferences sharedpreferences = activity.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
||||
int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK);
|
||||
if( theme == Helper.THEME_DARK){
|
||||
main_header_container.setBackgroundDrawable( activity.getResources().getDrawable(R.drawable.side_nav_bar_dark));
|
||||
}else {
|
||||
main_header_container.setBackgroundDrawable( activity.getResources().getDrawable(R.drawable.side_nav_bar));
|
||||
}
|
||||
}
|
||||
}
|
||||
profilePicture.setOnClickListener(null);
|
||||
|
|
|
@ -22,13 +22,7 @@
|
|||
android:id="@+id/container"
|
||||
android:layout_height="@dimen/nav_header_height"
|
||||
>
|
||||
<ImageView
|
||||
android:id="@+id/back_ground_image"
|
||||
android:layout_alignParentTop="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -103,5 +97,11 @@
|
|||
android:layout_height="20dp"
|
||||
tools:ignore="ContentDescription" />
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/back_ground_image"
|
||||
android:layout_alignParentTop="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:ignore="ContentDescription" />
|
||||
</RelativeLayout>
|
||||
|
|
Loading…
Reference in New Issue