-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Improve drawer header #564 #567
Conversation
Great @tanmayrauth, it would be better if you could change the design a bit. We can have a taller header with some nice interface |
Do you have any idea ? For now i had this design in my mind since this one is simple and better than what we have now. |
No tanmay, didn't think it through quite yet. Maybe some background like a ripple effect with the badge icon as the center of the ripple? |
Thanks for suggestion. I will get the background added. |
@adityastic I have added background for the header. Please take a look, if it works then we can get it merged :) |
@tanmayrauth we don't work with pngs anymore. Let's get a vector, and also the effect is not what we discussed. Please check the changes |
I will make modification for the vector. |
@tanmayrauth not if you also include the app icon in the background as well |
That will require photoshop skills i guess. Sorry but m not good in it. |
@adityastic Please take a look |
@tanmayrauth let's make something more creative. Those ripples don't match the app scheme |
Use this and remove the badge magic icon from the header completely. Use a nice downloadable font to write Badge Magic on the header
|
Also, make the header size larger, the way it was originally |
@adityastic Please take a look now. I have used your provided vector. |
<View | ||
android:layout_width="match_parent" | ||
android:layout_height="24dp" /> | ||
android:fontFamily="cursive" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use a downloadable font, Open Sans Semi Bold
@@ -3,23 +3,22 @@ | |||
xmlns:app="http://schemas.android.com/apk/res-auto" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace the file with
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
android:theme="@style/ThemeOverlay.AppCompat.Dark">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:src="@drawable/ic_header_background" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:fontFamily="@font/open_sans_semibold"
android:paddingTop="@dimen/nav_header_padding"
android:text="@string/app_name"
android:textAlignment="center"
android:textAllCaps="false"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
android:textColor="@color/drawer_header_title"
android:textSize="@dimen/drawer_header_text_size"
android:textStyle="bold"
android:typeface="serif" />
</RelativeLayout>
app/src/main/res/values/colors.xml
Outdated
@@ -11,5 +11,6 @@ | |||
|
|||
<color name="md_grey_400">#BDBDBD</color> | |||
<color name="dividerColor">#e0e0e0</color> | |||
<color name="header_name">#000000</color> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<color name="header_name">#000000</color> | |
<color name="drawer_header_title">#fffff</color> |
app/src/main/res/values/dimens.xml
Outdated
@@ -24,7 +24,8 @@ | |||
<dimen name="activity_horizontal_margin">16dp</dimen> | |||
<dimen name="activity_vertical_margin">16dp</dimen> | |||
<dimen name="nav_header_vertical_spacing">8dp</dimen> | |||
<dimen name="nav_header_height">176dp</dimen> | |||
<dimen name="nav_header_height">120dp</dimen> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove both and add
<dimen name="drawer_header_text_size">30sp</dimen>
@tanmayrauth also rename the title of this pr to, "fix: improve drawer header" |
I have made all the above suggested changes. Hope it works this time :) |
@adityastic Please take a look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good for the moment
Fixes #564
Changes: UI Fix for Navigation drawer: Adjusted proper padding and app name. Removed unwanted Views.
Screenshots for the change: