Skip to content

Commit

Permalink
Theme Added + Directory
Browse files Browse the repository at this point in the history
  • Loading branch information
whyfoo committed Dec 7, 2021
1 parent 2fa4567 commit 225e53b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.view.Menu
import android.widget.Toast
import androidx.navigation.NavController
import androidx.navigation.findNavController
Expand Down Expand Up @@ -39,7 +40,10 @@ class HomeActivity : AppCompatActivity() {
binding.bottomNavigation.setupWithNavController(navController)
}


override fun onCreateOptionsMenu(menu: Menu?): Boolean {
menuInflater.inflate(R.menu.navigation_drawer, menu)
return super.onCreateOptionsMenu(menu)
}

override fun onBackPressed() {
if (backPressed) {
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/menu/navigation_drawer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android">

<group
android:id="@+id/group_navigation_bar"
android:checkableBehavior="single">
android:id="@+id/group_navigation_bar">
<!-- android:checkableBehavior="single"-->

<item
android:id="@+id/item_edit_profile"
Expand Down
15 changes: 15 additions & 0 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,19 @@
<item name="android:windowBackground">@color/bgc</item>
<item name="colorAccent">@color/pink</item>
</style>

<style name="Theme.Trolleapp.noActionBar" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">#02131C</item>
<item name="colorPrimaryVariant">#02131C</item>
<item name="colorOnPrimary">@color/white</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_700</item>
<item name="colorOnSecondary">@color/black</item>
<item name="android:windowBackground">@color/bgc</item>
<item name="colorAccent">@color/pink</item>
<item name="windowActionBar">false</item>
<item name="android:windowNoTitle">true</item>
</style>
</resources>

0 comments on commit 225e53b

Please sign in to comment.