Skip to content

Commit

Permalink
Changes in settings
Browse files Browse the repository at this point in the history
  • Loading branch information
tanujnotes committed Mar 11, 2024
1 parent aafc97a commit 911a5dc
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 10 deletions.
1 change: 1 addition & 0 deletions app/src/main/java/app/olauncher/data/Constants.kt
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ object Constants {
const val URL_DOUBLE_TAP = "https://tanujnotes.notion.site/Double-tap-to-lock-Olauncher-0f7fb103ec1f47d7a90cdfdcd7fb86ef"
const val URL_OLAUNCHER_GITHUB = "https://www.github.com/tanujnotes/Olauncher"
const val URL_OLAUNCHER_PLAY_STORE = "https://play.google.com/store/apps/details?id=app.olauncher"
const val URL_OLAUNCHER_PRO = "https://play.google.com/store/apps/details?id=app.prolauncher"
const val URL_PLAY_STORE_DEV = "https://play.google.com/store/apps/dev?id=7198807840081074933"
const val URL_TWITTER_TANUJ = "https://twitter.com/tanujnotes"
const val URL_WALLPAPERS = "https://gist.githubusercontent.com/tanujnotes/85e2d0343ace71e76615ac346fbff82b/raw"
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/app/olauncher/ui/SettingsFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ class SettingsFragment : Fragment(), View.OnClickListener, View.OnLongClickListe

when (view.id) {
R.id.olauncherHiddenApps -> showHiddenApps()
R.id.olauncherPro -> requireContext().openUrl(Constants.URL_OLAUNCHER_PRO)
R.id.digitalWellbeing -> viewModel.showDialog.postValue(Constants.Dialog.DIGITAL_WELLBEING)
R.id.appInfo -> openAppInfo(requireContext(), Process.myUserHandle(), BuildConfig.APPLICATION_ID)
R.id.setLauncher -> viewModel.resetLauncherLiveData.call()
Expand Down Expand Up @@ -198,6 +199,7 @@ class SettingsFragment : Fragment(), View.OnClickListener, View.OnLongClickListe
binding.appInfo.setOnClickListener(this)
binding.setLauncher.setOnClickListener(this)
binding.aboutOlauncher.setOnClickListener(this)
binding.olauncherPro.setOnClickListener(this)
binding.digitalWellbeing.setOnClickListener(this)
binding.autoShowKeyboard.setOnClickListener(this)
binding.toggleLock.setOnClickListener(this)
Expand Down
24 changes: 17 additions & 7 deletions app/src/main/res/layout-land/fragment_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,36 +60,46 @@
</FrameLayout>

<TextView
android:id="@+id/aboutOlauncher"
android:id="@+id/setLauncher"
style="@style/TextSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="8dp"
android:text="@string/set_as_default_launcher" />

<TextView
android:id="@+id/aboutOlauncher"
style="@style/TextSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="12dp"
android:layout_marginBottom="8dp"
android:text="@string/about_olauncher" />

<TextView
android:id="@+id/digitalWellbeing"
android:id="@+id/olauncherPro"
style="@style/TextSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="12dp"
android:layout_marginBottom="8dp"
android:text="@string/digital_wellbeing"
android:visibility="gone"
tools:visibility="visible" />
android:text="@string/olauncher_pro" />

<TextView
android:id="@+id/setLauncher"
android:id="@+id/digitalWellbeing"
style="@style/TextSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="12dp"
android:layout_marginBottom="8dp"
android:text="@string/set_as_default_launcher" />
android:text="@string/digital_wellbeing"
android:visibility="gone"
tools:visibility="visible" />

</LinearLayout>

Expand Down
14 changes: 12 additions & 2 deletions app/src/main/res/layout/fragment_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@
android:layout_marginBottom="8dp"
android:text="@string/about_olauncher" />

<TextView
android:id="@+id/olauncherPro"
style="@style/TextSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="12dp"
android:layout_marginBottom="8dp"
android:text="@string/olauncher_pro" />

<TextView
android:id="@+id/digitalWellbeing"
style="@style/TextSmall"
Expand Down Expand Up @@ -955,13 +965,13 @@

<TextView
android:id="@+id/footer"
style="@style/TextSmallBold"
style="@style/TextSmall"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:letterSpacing="0.03"
android:padding="12dp"
android:text="@string/olauncher_pro" />
android:text="@string/digital_minimalism" />

</LinearLayout>

Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<string name="app_name" translatable="false">Olauncher</string>
<string name="github" translatable="false">Github</string>
<string name="lock_layout_description" translatable="false">lock layout description to be used a unique id to lock screen</string>
<string name="olauncher_pro" translatable="false"><u>Olauncher Pro</u></string>
<string name="olauncher_pro" translatable="false">Olauncher Pro</string>
<string name="digital_minimalism" translatable="false"><u>Digital Minimalism</u></string>
<string name="day_battery" formatted="false" translatable="false">%s, %d%%</string>
<string name="tag_0" translatable="false">0</string>
<string name="tag_1" translatable="false">1</string>
Expand Down

0 comments on commit 911a5dc

Please sign in to comment.