侧拉
This commit is contained in:
BIN
app/src/main/res/drawable-v24/ic_drawer_home.png
Normal file
BIN
app/src/main/res/drawable-v24/ic_drawer_home.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 108 B |
BIN
app/src/main/res/drawable/test_avatar.jpg
Normal file
BIN
app/src/main/res/drawable/test_avatar.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
@@ -1,18 +1,96 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
|
||||
<com.mxn.soul.flowingdrawer_core.FlowingDrawer xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/drawerlayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="com.example.ninefourone.nutritionmaster.MainActivity">
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
app:edMenuBackground="@color/colorPrimary"
|
||||
app:edMenuSize="230dp"
|
||||
app:edPosition="1">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Hello World!"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<FrameLayout
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/colorPrimary"
|
||||
app:contentInsetStart="0dp"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/navigation_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<ImageView
|
||||
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_drawer_home" />
|
||||
|
||||
<com.github.siyamed.shapeimageview.CircularImageView
|
||||
android:id="@+id/toolbar_user_avatar"
|
||||
android:layout_width="34dp"
|
||||
android:layout_height="31dp"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:src="@drawable/test_avatar" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:maxLines="1"
|
||||
android:text="营养大师"
|
||||
android:textColor="#FFFF"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</android.support.v7.widget.Toolbar>
|
||||
</android.support.design.widget.AppBarLayout>
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
</FrameLayout>
|
||||
|
||||
<!--menu-->
|
||||
<com.mxn.soul.flowingdrawer_core.FlowingMenuLayout
|
||||
android:id="@+id/menulayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<Button
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="50dp"
|
||||
android:text="sidjisd" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="50dp"
|
||||
android:text="hahahah" />
|
||||
</LinearLayout>
|
||||
|
||||
</com.mxn.soul.flowingdrawer_core.FlowingMenuLayout>
|
||||
|
||||
</com.mxn.soul.flowingdrawer_core.FlowingDrawer>
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#3F51B5</color>
|
||||
<color name="colorPrimaryDark">#303F9F</color>
|
||||
<color name="colorAccent">#FF4081</color>
|
||||
|
||||
<color name="colorPrimary">#FF03A9F4</color>
|
||||
<color name="colorPrimaryDark">#ff0171c9</color>
|
||||
<color name="colorAccent">#FF00E5FF</color>
|
||||
<color name="colorControlNormal">#FF78909C</color>
|
||||
<color name="colorControlActivated">#FF03A9F4</color>
|
||||
<color name="colorSwitchThumbNormal">#FF78909C</color>
|
||||
|
||||
|
||||
|
||||
</resources>
|
||||
|
||||
15
app/src/main/res/values/dimens.xml
Normal file
15
app/src/main/res/values/dimens.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<resources>
|
||||
<!-- Default screen margins, per the Android Design guidelines. -->
|
||||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||
<dimen name="activity_vertical_margin">16dp</dimen>
|
||||
<dimen name="fab_size_normal">100dp</dimen>
|
||||
<dimen name="text_size">12sp</dimen>
|
||||
|
||||
<dimen name="drawer_width">240dp</dimen>
|
||||
<dimen name="drawer_text">20sp</dimen>
|
||||
<dimen name="title_text">16sp</dimen>
|
||||
|
||||
<dimen name="bt_height">36dp</dimen>
|
||||
|
||||
|
||||
</resources>
|
||||
@@ -1,7 +1,7 @@
|
||||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
|
||||
Reference in New Issue
Block a user