Skip to content

Commit

Permalink
move info window into settings
Browse files Browse the repository at this point in the history
  • Loading branch information
LivingWithHippos committed Jan 2, 2023
1 parent 0a9b69e commit 2468b40
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,15 +228,6 @@ class MainActivity : AppCompatActivity() {
openSettings()
true
}
R.id.about -> {
LibsBuilder()
.withAboutAppName(getString(R.string.app_name))
.withAboutIconShown(true)
.withAboutVersionShown(true)
.withActivityTitle(getString(R.string.about))
.start(this@MainActivity)
true
}
else -> false
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import com.github.livingwithhippos.unchained.utilities.GPLV3_URL
import com.github.livingwithhippos.unchained.utilities.PLUGINS_URL
import com.github.livingwithhippos.unchained.utilities.extension.openExternalWebPage
import com.github.livingwithhippos.unchained.utilities.extension.showToast
import com.mikepenz.aboutlibraries.LibsBuilder
import dagger.hilt.android.AndroidEntryPoint
import timber.log.Timber
import javax.inject.Inject
Expand Down Expand Up @@ -93,6 +94,16 @@ class SettingsFragment : PreferenceFragmentCompat() {
it.keyListener = DigitsKeyListener.getInstance("0123456789")
}

findPreference<Preference>("about")?.setOnPreferenceClickListener {
LibsBuilder()
.withAboutAppName(getString(R.string.app_name))
.withAboutIconShown(true)
.withAboutVersionShown(true)
.withActivityTitle(getString(R.string.about))
.start(requireContext())
true
}

setupKodi()

setupVersion()
Expand Down
8 changes: 0 additions & 8 deletions app/app/src/main/res/menu/top_app_bar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,4 @@
android:title="@string/settings"
android:orderInCategory="99"
app:showAsAction="never" />

<item
android:id="@+id/about"
android:contentDescription="@string/content_description_about"
android:title="@string/about"
android:orderInCategory="99"
app:showAsAction="never" />

</menu>
5 changes: 5 additions & 0 deletions app/app/src/main/res/xml/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,11 @@
app:summary="@string/feedback_summary"
app:title="@string/feedback_title" />

<Preference
app:key="about"
app:summary="@string/content_description_about"
app:title="@string/about" />

<Preference
app:key="credits"
app:title="@string/credits_title" />
Expand Down

0 comments on commit 2468b40

Please sign in to comment.