[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [snowflake-mobile/master] Added custom toobar
commit 2cdd98f866fa17149b081a0e0f4bc517423cb670
Author: Hashik Donthineni <HashikDonthineni@xxxxxxxxx>
Date: Sun Jun 28 14:07:17 2020 +0530
Added custom toobar
---
app/src/main/res/layout/activity_main.xml | 19 +++++++++++++++++++
app/src/main/res/values/styles.xml | 2 +-
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 1c42128..0320e22 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -6,6 +6,25 @@
android:layout_height="match_parent"
tools:context=".MainActivity">
+ <androidx.appcompat.widget.Toolbar
+ android:id="@+id/toolbar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="@color/colorPrimary"
+ android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
+ app:layout_constraintTop_toTopOf="parent">
+
+ <TextView
+ android:id="@+id/toolbar_title"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:text="@string/app_name"
+ android:textAppearance="@style/TextAppearance.Widget.AppCompat.Toolbar.Title"
+ android:textColor="@android:color/white"
+ android:textSize="16sp" />
+ </androidx.appcompat.widget.Toolbar>
+
<Button
android:id="@+id/start_button"
android:layout_width="wrap_content"
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 5885930..0eb88fe 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -1,7 +1,7 @@
<resources>
<!-- Base application theme. -->
- <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
+ <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits