Skip to content

Commit

Permalink
feat: Add optional user authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
cyb3rko committed Mar 30, 2023
1 parent 8b4afc7 commit 6aa6518
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
5 changes: 5 additions & 0 deletions app/src/main/AndroidManifest.xml
Expand Up @@ -32,6 +32,11 @@

</activity>

<activity
android:name="com.cyb3rko.backpack.activities.BackpackAuthenticationActivity"
android:exported="false"
android:fitsSystemWindows="true" />

<activity
android:name="com.cyb3rko.pincredible.SettingsActivity"
android:parentActivityName=".MainActivity"
Expand Down
7 changes: 4 additions & 3 deletions app/src/main/kotlin/com/cyb3rko/pincredible/MainActivity.kt
Expand Up @@ -18,6 +18,7 @@ package com.cyb3rko.pincredible

import android.os.Bundle
import androidx.navigation.findNavController
import androidx.viewbinding.ViewBinding
import com.cyb3rko.backpack.activities.BackpackMainActivity
import com.cyb3rko.backpack.interfaces.BackpackMain
import com.cyb3rko.pincredible.databinding.ActivityMainBinding
Expand All @@ -30,12 +31,12 @@ class MainActivity : BackpackMainActivity(), BackpackMain {
super.onCreate(savedInstanceState)
Thread.setDefaultUncaughtExceptionHandler(ExceptionHandler(this))
binding = ActivityMainBinding.inflate(layoutInflater).asContentView()
findNavController(R.id.nav_host_fragment_content_main).apply()
bindInterface(this)
}

override fun onPostCreate(savedInstanceState: Bundle?) {
super.onPostCreate(savedInstanceState)
findNavController(R.id.nav_host_fragment_content_main).applyToActionBar()
override fun getBinding(): ViewBinding {
return binding
}

override fun getToolbar(): MaterialToolbar {
Expand Down
8 changes: 8 additions & 0 deletions app/src/main/res/xml/preferences.xml
Expand Up @@ -5,6 +5,14 @@
<PreferenceCategory
app:title="@string/preference_category_security">

<SwitchPreferenceCompat
app:key="app_lock"
app:defaultValue="false"
app:singleLineTitle="false"
app:title="@string/preference_item_app_lock"
app:summary="@string/preference_item_app_lock_summary"
app:icon="@drawable/colored_ic_biometry" />

<SwitchPreferenceCompat
app:key="button_randomizer"
app:defaultValue="false"
Expand Down

0 comments on commit 6aa6518

Please sign in to comment.