Skip to content

Commit

Permalink
Add Inure link in about panel
Browse files Browse the repository at this point in the history
  • Loading branch information
Hamza417 committed Jul 9, 2024
1 parent 8b695c4 commit ae2736b
Show file tree
Hide file tree
Showing 7 changed files with 112 additions and 14 deletions.
24 changes: 22 additions & 2 deletions app/src/main/java/app/simple/positional/ui/panels/Settings.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ import android.net.Uri
import android.os.Bundle
import android.provider.Settings
import android.util.Log
import android.view.*
import android.view.LayoutInflater
import android.view.MotionEvent
import android.view.View
import android.view.ViewGroup
import android.view.WindowManager
import android.widget.TextView
import android.widget.Toast
import androidx.activity.result.ActivityResultLauncher
Expand All @@ -31,7 +35,13 @@ import app.simple.positional.decorations.ripple.DynamicRippleImageButton
import app.simple.positional.decorations.ripple.DynamicRippleLinearLayout
import app.simple.positional.decorations.ripple.DynamicRippleTextView
import app.simple.positional.decorations.switchview.SwitchView
import app.simple.positional.dialogs.settings.*
import app.simple.positional.dialogs.settings.CoordinatesFormat
import app.simple.positional.dialogs.settings.Icons
import app.simple.positional.dialogs.settings.Locales
import app.simple.positional.dialogs.settings.LocationProvider
import app.simple.positional.dialogs.settings.RoundedCorners
import app.simple.positional.dialogs.settings.Theme
import app.simple.positional.dialogs.settings.Units
import app.simple.positional.extensions.fragment.ScopedFragment
import app.simple.positional.popups.settings.LegalNotesPopupMenu
import app.simple.positional.preferences.MainPreferences
Expand Down Expand Up @@ -71,6 +81,7 @@ class Settings : ScopedFragment(), CoordinatesCallback, PopupMenuCallback {
private lateinit var keepScreenOn: DynamicRippleConstraintLayout
private lateinit var coordinatesFormatContainer: DynamicRippleLinearLayout
private lateinit var coordinatesFormat: TextView
private lateinit var inure: DynamicRippleConstraintLayout


private lateinit var toggleKeepScreenOn: SwitchView
Expand Down Expand Up @@ -137,6 +148,7 @@ class Settings : ScopedFragment(), CoordinatesCallback, PopupMenuCallback {
keepScreenOn = view.findViewById(R.id.setting_keep_screen_on)
coordinatesFormatContainer = view.findViewById(R.id.settings_coordinates)
coordinatesFormat = view.findViewById(R.id.current_coordinate_format)
inure = view.findViewById(R.id.inure)

toggleKeepScreenOn = view.findViewById(R.id.toggle_screen_on)
toggleCustomLocation = view.findViewById(R.id.toggle_custom_location)
Expand Down Expand Up @@ -358,6 +370,12 @@ class Settings : ScopedFragment(), CoordinatesCallback, PopupMenuCallback {
CoordinatesFormat.newInstance()
.show(childFragmentManager, "coordinates_format")
}

inure.setOnClickListener {
val intent = Intent(Intent.ACTION_VIEW)
intent.data = Uri.parse(INURE_PLAY_STORE_URL)
startActivity(intent)
}
}

private fun setCurrentLocation() {
Expand Down Expand Up @@ -517,5 +535,7 @@ class Settings : ScopedFragment(), CoordinatesCallback, PopupMenuCallback {
fragment.arguments = args
return fragment
}

private const val INURE_PLAY_STORE_URL = "https://play.google.com/store/apps/details?id=app.simple.inure.play"
}
}
Binary file added app/src/main/res/drawable-nodpi/inure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions app/src/main/res/layout/fragment_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@

<include layout="@layout/pref_contribute" />

<include layout="@layout/pref_other_apps" />

</LinearLayout>

</app.simple.positional.decorations.padding.PaddingAwareNestedScrollView>
Expand Down
12 changes: 0 additions & 12 deletions app/src/main/res/layout/pref_contribute.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,4 @@
android:textColor="@color/textPrimary"
android:textSize="@dimen/settings_primary_text_size" />

<app.simple.positional.decorations.ripple.DynamicRippleTextView
android:id="@+id/my_other_apps"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:background="@drawable/ripple"
android:fontFamily="@font/medium"
android:padding="15dp"
android:text="@string/my_developer_profile"
android:textColor="@color/textPrimary"
android:textSize="@dimen/settings_primary_text_size" />

</LinearLayout>
85 changes: 85 additions & 0 deletions app/src/main/res/layout/pref_other_apps.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="20dp"
android:orientation="vertical"
android:paddingHorizontal="16dp">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="15dp"
android:fontFamily="@font/medium"
android:text="@string/other_apps"
android:textColor="@color/textSecondary"
android:textSize="@dimen/settings_category_text_size" />

<View
android:layout_width="match_parent"
android:layout_height="1px"
android:layout_marginHorizontal="15dp"
android:background="@color/dividerColor" />

<app.simple.positional.decorations.ripple.DynamicRippleConstraintLayout
android:id="@+id/inure"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple"
android:clickable="true"
android:focusable="true"
android:orientation="vertical"
android:padding="15dp">

<ImageView
android:id="@+id/imageView"
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@drawable/inure"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/textView12"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:fontFamily="@font/medium"
android:text="@string/inure_app_manager"
android:textColor="@color/textPrimary"
android:textSize="@dimen/settings_primary_text_size"
app:layout_constraintBottom_toTopOf="@+id/textView13"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toEndOf="@+id/imageView"
app:layout_constraintTop_toTopOf="@+id/imageView" />

<TextView
android:id="@+id/textView13"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:fontFamily="@font/regular"
android:text="@string/inure_app_manager_summary"
android:textColor="@color/textTertiary"
android:textSize="@dimen/settings_secondary_text_size"
app:layout_constraintBottom_toBottomOf="@+id/imageView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/imageView"
app:layout_constraintTop_toBottomOf="@+id/textView12" />

</app.simple.positional.decorations.ripple.DynamicRippleConstraintLayout>

<app.simple.positional.decorations.ripple.DynamicRippleTextView
android:id="@+id/my_other_apps"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:background="@drawable/ripple"
android:fontFamily="@font/medium"
android:padding="15dp"
android:text="@string/my_developer_profile"
android:textColor="@color/textPrimary"
android:textSize="@dimen/settings_primary_text_size" />
</LinearLayout>
2 changes: 2 additions & 0 deletions app/src/main/res/values/non_translatable_strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
<string name="dd_ddd" translatable="false">DD.DDD°</string>
<string name="dd_mm_mmm" translatable="false">DD°MM.MMM</string>
<string name="dd_mm_ss_sss" translatable="false">DD°MM\'SS.SSS</string>
<string name="inure_app_manager" translatable="false">Inure App Manager</string>
<string name="inure_app_manager_summary" translatable="false">An elegant and beautiful premium Android app manager for both rooted and non-rooted devices and a built-in terminal, analytics panel and an independent custom theme engine, developed with purely custom APIs created for this app and has Shizuku support.</string>

<!-- Bottom Bar -->
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -338,4 +338,5 @@
<string name="elongation">Elongation</string>
<string name="radius">Radius</string>
<string name="crescent_width">Crescent Width</string>
<string name="other_apps">Other Apps</string>
</resources>

0 comments on commit ae2736b

Please sign in to comment.