diff options
author | Allan Wang <me@allanwang.ca> | 2019-12-27 00:28:33 -0800 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2019-12-27 00:28:33 -0800 |
commit | 44524ce6eea7b0d0998bbabc8d72ea8b43f55f02 (patch) | |
tree | bbcdc7a3d3c54048f838635280ac0d1a3f341133 /app/src/main/res | |
parent | 454872d712a0496e97b7138b30cc2fccac037b2f (diff) | |
download | frost-44524ce6eea7b0d0998bbabc8d72ea8b43f55f02.tar.gz frost-44524ce6eea7b0d0998bbabc8d72ea8b43f55f02.tar.bz2 frost-44524ce6eea7b0d0998bbabc8d72ea8b43f55f02.zip |
Add nav items programmatically
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/drawable/nav_item_background.xml | 14 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_main_drawer_wrapper.xml | 9 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 4 | ||||
-rw-r--r-- | app/src/main/res/values/styles.xml | 11 |
4 files changed, 34 insertions, 4 deletions
diff --git a/app/src/main/res/drawable/nav_item_background.xml b/app/src/main/res/drawable/nav_item_background.xml new file mode 100644 index 00000000..7c7a7209 --- /dev/null +++ b/app/src/main/res/drawable/nav_item_background.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<ripple xmlns:android="http://schemas.android.com/apk/res/android" + android:color="#f0f"> + <item + android:id="@android:id/mask" + android:right="8dp"> + <shape android:shape="rectangle"> + <corners + android:bottomRightRadius="50dp" + android:topRightRadius="50dp" /> + <solid android:color="#fff" /> + </shape> + </item> +</ripple>
\ No newline at end of file diff --git a/app/src/main/res/layout/activity_main_drawer_wrapper.xml b/app/src/main/res/layout/activity_main_drawer_wrapper.xml index 1af2e639..d5efcf0d 100644 --- a/app/src/main/res/layout/activity_main_drawer_wrapper.xml +++ b/app/src/main/res/layout/activity_main_drawer_wrapper.xml @@ -1,9 +1,11 @@ <?xml version="1.0" encoding="utf-8"?> <androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" + xmlns:tools="http://schemas.android.com/tools" android:id="@+id/drawer" + android:layout_width="match_parent" android:layout_height="match_parent" - android:fitsSystemWindows="true"> + android:fitsSystemWindows="true" + tools:openDrawer="end"> <FrameLayout android:id="@+id/main_container" @@ -15,5 +17,6 @@ android:id="@+id/navigation" android:layout_width="wrap_content" android:layout_height="match_parent" - android:visibility="gone" /> + android:layout_gravity="start" + android:theme="@style/ThemeOverlay.Frost.NavigationView" /> </androidx.drawerlayout.widget.DrawerLayout>
\ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index dda6c789..96957c4c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -40,12 +40,14 @@ <string name="show_all_results">Show All Results</string> - <string name="frost_description">Frost is a fully themable, fully functional alternative to the official Facebook app, made from scratch and proudly open sourced.</string> <string name="faq_title">Frost FAQ</string> + <string name="open">Open</string> + <string name="close">Close</string> + <string name="html_extraction_error">An error occurred in the html extraction.</string> <string name="html_extraction_cancelled">The request has been cancelled.</string> <string name="html_extraction_timeout">The request has timed out.</string> diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index c5179bb1..3cbad6d7 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -128,5 +128,16 @@ <item name="tabMode">fixed</item> </style> + <style name="ThemeOverlay.Frost.NavigationView" parent=""> + <item name="android:colorControlHighlight">@android:color/transparent</item> + </style> + +<!-- <style name="ShapeAppearanceOverlay.Item" parent="">--> +<!-- <item name="cornerFamily">rounded</item>--> +<!-- <item name="cornerSizeTopRight">10dp</item>--> +<!-- <item name="cornerSizeBottomRight">10dp</item>--> +<!-- <item name="cornerSizeBottomLeft">0dp</item>--> +<!-- <item name="cornerSizeTopLeft">0dp</item>--> +<!-- </style>--> </resources> |