Skip to content

Commit

Permalink
Sample: Change 'Theme.AppCompat' to 'Theme.Neumorph'
Browse files Browse the repository at this point in the history
  • Loading branch information
fornewid committed Apr 26, 2020
1 parent b2914c8 commit 1548a0c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
5 changes: 4 additions & 1 deletion sample/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

<soup.neumorphism.NeumorphEditText
android:id="@+id/edittext"
style="@style/Widget.Neumorph.EditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="48dp"
Expand Down Expand Up @@ -96,6 +97,7 @@

<soup.neumorphism.NeumorphButton
android:id="@+id/button"
style="@style/Widget.Neumorph.Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="48dp"
Expand All @@ -112,6 +114,7 @@
android:scaleType="centerInside"
android:src="@drawable/ic_filter"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
app:layout_constraintEnd_toEndOf="parent"
app:neumorph_shapeAppearance="@style/CustomShapeAppearance" />

</androidx.constraintlayout.widget.ConstraintLayout>
2 changes: 1 addition & 1 deletion sample/src/main/res/values-v23/themes.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="Platform.Theme.Neumorphism" parent="Theme.AppCompat.DayNight.NoActionBar">
<style name="Platform.Theme.Neumorphism" parent="Theme.Neumorph.DayNight.NoActionBar">
<item name="android:statusBarColor">@color/status_bar_scrim</item>
<item name="android:windowLightStatusBar">@bool/use_light_status_bar</item>
<item name="android:navigationBarColor">@color/nav_bar_scrim</item>
Expand Down
2 changes: 1 addition & 1 deletion sample/src/main/res/values-v27/themes.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="Platform.Theme.Neumorphism" parent="Theme.AppCompat.DayNight.NoActionBar">
<style name="Platform.Theme.Neumorphism" parent="Theme.Neumorph.DayNight.NoActionBar">
<item name="android:statusBarColor">@color/background</item>
<item name="android:windowLightStatusBar">@bool/use_light_status_bar</item>
<item name="android:navigationBarColor">@color/background</item>
Expand Down
7 changes: 7 additions & 0 deletions sample/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="CustomShapeAppearance">
<item name="neumorph_cornerFamily">rounded</item>
<item name="neumorph_cornerSize">32dp</item>
</style>
</resources>
2 changes: 1 addition & 1 deletion sample/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="Platform.Theme.Neumorphism" parent="Theme.AppCompat.DayNight.NoActionBar">
<style name="Platform.Theme.Neumorphism" parent="Theme.Neumorph.DayNight.NoActionBar">
<item name="android:statusBarColor">@color/status_bar_scrim</item>
<item name="android:navigationBarColor">@color/nav_bar_scrim</item>
</style>
Expand Down

0 comments on commit 1548a0c

Please sign in to comment.