mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-13 22:00:30 +05:30
feat: include display size and font scale in device info dialog
This commit is contained in:
parent
7a4635d873
commit
3cc8c8be88
@ -1,6 +1,7 @@
|
|||||||
package com.github.libretube.ui.activities
|
package com.github.libretube.ui.activities
|
||||||
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
import android.content.res.Resources
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.core.text.HtmlCompat
|
import androidx.core.text.HtmlCompat
|
||||||
@ -93,13 +94,15 @@ class AboutActivity : BaseActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun showDeviceInfo() {
|
private fun showDeviceInfo() {
|
||||||
|
val metrics = Resources.getSystem().displayMetrics
|
||||||
|
|
||||||
val text = "Manufacturer: ${Build.MANUFACTURER}\n" +
|
val text = "Manufacturer: ${Build.MANUFACTURER}\n" +
|
||||||
"Model: ${Build.MODEL}\n" +
|
"Board: ${Build.BOARD}\n" +
|
||||||
"SDK: ${Build.VERSION.SDK_INT}\n" +
|
"Arch: ${Build.SUPPORTED_ABIS[0]}\n" +
|
||||||
"Board: ${Build.BOARD}\n" +
|
"Android SDK: ${Build.VERSION.SDK_INT}\n" +
|
||||||
"OS: Android ${Build.VERSION.RELEASE}\n" +
|
"OS: Android ${Build.VERSION.RELEASE}\n" +
|
||||||
"Arch: ${Build.SUPPORTED_ABIS[0]}\n" +
|
"Display: ${metrics.widthPixels}x${metrics.heightPixels}\n" +
|
||||||
"Product: ${Build.PRODUCT}"
|
"Font scale: ${Resources.getSystem().configuration.fontScale}"
|
||||||
|
|
||||||
MaterialAlertDialogBuilder(this)
|
MaterialAlertDialogBuilder(this)
|
||||||
.setTitle(R.string.device_info)
|
.setTitle(R.string.device_info)
|
||||||
|
Loading…
Reference in New Issue
Block a user