mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-04-23 19:32:16 +00:00
Update: Merge Header and ReleaseInfo into AppInfo
This commit is contained in:
parent
3ebee7a199
commit
84a993df5f
@ -91,7 +91,7 @@ class ProductAdapter(private val callbacks: Callbacks, private val columns: Int)
|
||||
data class Downloading(val read: Long, val total: Long?) : Status()
|
||||
}
|
||||
|
||||
enum class ViewType { HEADER, RELEASE_INFO, SWITCH, SECTION, EXPAND, TEXT, LINK, PERMISSIONS, SCREENSHOT, RELEASE, EMPTY }
|
||||
enum class ViewType { APP_INFO, SWITCH, SECTION, EXPAND, TEXT, LINK, PERMISSIONS, SCREENSHOT, RELEASE, EMPTY }
|
||||
|
||||
private enum class SwitchType(val titleResId: Int) {
|
||||
IGNORE_ALL_UPDATES(R.string.ignore_all_updates),
|
||||
@ -132,20 +132,12 @@ class ProductAdapter(private val callbacks: Callbacks, private val columns: Int)
|
||||
abstract val descriptor: String
|
||||
abstract val viewType: ViewType
|
||||
|
||||
class HeaderItem(val repository: Repository, val product: Product) : Item() {
|
||||
class AppInfoItem(val repository: Repository, val product: Product) : Item() {
|
||||
override val descriptor: String
|
||||
get() = "header"
|
||||
get() = "app_info.${product.name}"
|
||||
|
||||
override val viewType: ViewType
|
||||
get() = ViewType.HEADER
|
||||
}
|
||||
|
||||
object ReleaseInfoItem : Item() {
|
||||
override val descriptor: String
|
||||
get() = "release_item"
|
||||
override val viewType: ViewType
|
||||
get() = ViewType.RELEASE_INFO
|
||||
|
||||
get() = ViewType.APP_INFO
|
||||
}
|
||||
|
||||
class SwitchItem(
|
||||
@ -325,7 +317,7 @@ class ProductAdapter(private val callbacks: Callbacks, private val columns: Int)
|
||||
|
||||
private enum class Payload { REFRESH, STATUS }
|
||||
|
||||
private class HeaderViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||
private class AppInfoViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||
val icon = itemView.findViewById<ShapeableImageView>(R.id.icon)!!
|
||||
val name = itemView.findViewById<MaterialTextView>(R.id.name)!!
|
||||
val packageName = itemView.findViewById<MaterialTextView>(R.id.package_name)!!
|
||||
@ -351,9 +343,7 @@ class ProductAdapter(private val callbacks: Callbacks, private val columns: Int)
|
||||
this.progressIcon = progressIcon
|
||||
this.defaultIcon = defaultIcon
|
||||
}
|
||||
}
|
||||
|
||||
private class ReleaseInfoViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||
val targetBlock = itemView.findViewById<LinearLayoutCompat>(R.id.sdk_block)!!
|
||||
val divider1 = itemView.findViewById<MaterialDivider>(R.id.divider1)!!
|
||||
val targetSdk = itemView.findViewById<MaterialTextView>(R.id.sdk)!!
|
||||
@ -669,7 +659,7 @@ class ProductAdapter(private val callbacks: Callbacks, private val columns: Int)
|
||||
items.clear()
|
||||
|
||||
if (productRepository != null) {
|
||||
items += Item.HeaderItem(productRepository.second, productRepository.first)
|
||||
items += Item.AppInfoItem(productRepository.second, productRepository.first)
|
||||
|
||||
if (installedItem != null) {
|
||||
items.add(
|
||||
@ -722,7 +712,6 @@ class ProductAdapter(private val callbacks: Callbacks, private val columns: Int)
|
||||
return if (length >= 0) subSequence(0, length) else null
|
||||
}
|
||||
|
||||
items.add(Item.ReleaseInfoItem)
|
||||
val screenshotItems = productRepository.first.screenshots
|
||||
.map { Item.ScreenshotItem(productRepository.second, packageName, it) }
|
||||
if (screenshotItems.isNotEmpty()) {
|
||||
@ -970,7 +959,7 @@ class ProductAdapter(private val callbacks: Callbacks, private val columns: Int)
|
||||
val translate = this.action == null || action == null ||
|
||||
this.action == Action.CANCEL || action == Action.CANCEL
|
||||
this.action = action
|
||||
val index = items.indexOfFirst { it is Item.HeaderItem }
|
||||
val index = items.indexOfFirst { it is Item.AppInfoItem }
|
||||
if (index >= 0) {
|
||||
if (translate) {
|
||||
notifyItemChanged(index)
|
||||
@ -987,7 +976,7 @@ class ProductAdapter(private val callbacks: Callbacks, private val columns: Int)
|
||||
val translate = (this.status == null) != (status == null)
|
||||
if (this.status != status) {
|
||||
this.status = status
|
||||
val index = items.indexOfFirst { it is Item.HeaderItem }
|
||||
val index = items.indexOfFirst { it is Item.AppInfoItem }
|
||||
if (index >= 0) {
|
||||
if (translate) {
|
||||
notifyItemChanged(index)
|
||||
@ -1015,10 +1004,9 @@ class ProductAdapter(private val callbacks: Callbacks, private val columns: Int)
|
||||
viewType: ViewType,
|
||||
): RecyclerView.ViewHolder {
|
||||
return when (viewType) {
|
||||
ViewType.HEADER -> HeaderViewHolder(parent.inflate(R.layout.product_header_item)).apply {
|
||||
ViewType.APP_INFO -> AppInfoViewHolder(parent.inflate(R.layout.item_app_info_x)).apply {
|
||||
action.setOnClickListener { this@ProductAdapter.action?.let(callbacks::onActionClick) }
|
||||
}
|
||||
ViewType.RELEASE_INFO -> ReleaseInfoViewHolder(parent.inflate(R.layout.release_info))
|
||||
ViewType.SWITCH -> SwitchViewHolder(parent.inflate(R.layout.switch_item)).apply {
|
||||
itemView.setOnClickListener {
|
||||
val switchItem = items[adapterPosition] as Item.SwitchItem
|
||||
@ -1037,7 +1025,7 @@ class ProductAdapter(private val callbacks: Callbacks, private val columns: Int)
|
||||
}
|
||||
ProductPreferences[switchItem.packageName] = productPreference
|
||||
items.asSequence().mapIndexedNotNull { index, item ->
|
||||
if (item is Item.HeaderItem ||
|
||||
if (item is Item.AppInfoItem ||
|
||||
item is Item.SectionItem
|
||||
) index else null
|
||||
}.forEach { notifyItemChanged(it, Payload.REFRESH) }
|
||||
@ -1168,9 +1156,9 @@ class ProductAdapter(private val callbacks: Callbacks, private val columns: Int)
|
||||
val context = holder.itemView.context
|
||||
val item = items[position]
|
||||
when (getItemEnumViewType(position)) {
|
||||
ViewType.HEADER -> {
|
||||
holder as HeaderViewHolder
|
||||
item as Item.HeaderItem
|
||||
ViewType.APP_INFO -> {
|
||||
holder as AppInfoViewHolder
|
||||
item as Item.AppInfoItem
|
||||
val updateStatus = Payload.STATUS in payloads
|
||||
val updateAll = !updateStatus
|
||||
if (updateAll) {
|
||||
@ -1241,11 +1229,6 @@ class ProductAdapter(private val callbacks: Callbacks, private val columns: Int)
|
||||
}::class
|
||||
}
|
||||
}
|
||||
Unit
|
||||
}
|
||||
ViewType.RELEASE_INFO -> {
|
||||
holder as ReleaseInfoViewHolder
|
||||
item as Item.ReleaseInfoItem
|
||||
|
||||
val imageSource = product?.source?.trimAfter('/', 4).plus(".png").toUri()
|
||||
val sdk = product?.displayRelease?.targetSdkVersion
|
||||
|
242
src/main/res/layout/item_app_info_x.xml
Normal file
242
src/main/res/layout/item_app_info_x.xml
Normal file
@ -0,0 +1,242 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="4dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/header_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="12dp"
|
||||
android:layout_marginVertical="4dp"
|
||||
android:background="@drawable/background_border"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toTopOf="@id/status_layout"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp">
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/icon"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
app:shapeAppearanceOverlay="@style/Shape.Medium"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/text_margin"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?textAppearanceBody1" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/package_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?textAppearanceBody2"
|
||||
android:textColor="?android:attr/textColorSecondary" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/release_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/header_info">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/sdk_block"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/target"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/sdk"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:textSize="16sp" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
android:id="@+id/divider1"
|
||||
android:layout_width="2dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginVertical="12dp" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/version_block"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/version"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/version"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:textSize="16sp" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
android:id="@+id/divider2"
|
||||
android:layout_width="2dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginVertical="12dp" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/size_block"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/size"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/size"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:textSize="16sp" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
android:id="@+id/divider3"
|
||||
android:layout_width="2dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginVertical="12dp" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/dev_block"
|
||||
style="?attr/materialCardViewElevatedStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="4dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/divider3"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/dev_icon"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
app:shapeAppearanceOverlay="@style/Shape.Small"
|
||||
app:srcCompat="@drawable/ic_code" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/dev"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:textSize="12sp" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/status_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:paddingBottom="4dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/action"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/header_info">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/status"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:singleLine="true"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||
android:id="@+id/progress"
|
||||
style="@style/Theme.Progress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/action"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginHorizontal="12dp"
|
||||
app:iconGravity="textStart"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/status_layout"
|
||||
app:shapeAppearanceOverlay="@style/PillShapeAppearance" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -1,85 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="4dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:paddingBottom="8dp">
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/icon"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
app:shapeAppearanceOverlay="@style/Shape.Medium"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/text_margin"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?textAppearanceBody1" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/package_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="?textAppearanceBody2"
|
||||
android:textColor="?android:attr/textColorSecondary" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/status_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:paddingBottom="4dp">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/status"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:singleLine="true"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||
android:id="@+id/progress"
|
||||
style="@style/Theme.Progress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/action"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginHorizontal="12dp"
|
||||
app:iconGravity="textStart"
|
||||
app:shapeAppearanceOverlay="@style/PillShapeAppearance" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
@ -1,139 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.appcompat.widget.LinearLayoutCompat 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_marginHorizontal="12dp"
|
||||
android:layout_marginVertical="4dp"
|
||||
android:background="@drawable/background_border"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/sdk_block"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/target"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/sdk"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:textSize="16sp" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
android:id="@+id/divider1"
|
||||
android:layout_width="2dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginVertical="12dp" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/version_block"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/version"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/version"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:textSize="16sp" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
android:id="@+id/divider2"
|
||||
android:layout_width="2dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginVertical="12dp" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/size_block"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/size"
|
||||
android:textColor="?android:textColorPrimary"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/size"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:textSize="16sp" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
android:id="@+id/divider3"
|
||||
android:layout_width="2dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginVertical="12dp" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/dev_block"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="4dp"
|
||||
android:layout_weight="1"
|
||||
style="?attr/materialCardViewElevatedStyle">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/divider3"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/dev_icon"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
app:shapeAppearanceOverlay="@style/Shape.Small"
|
||||
app:srcCompat="@drawable/ic_code" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/dev"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
android:singleLine="true"
|
||||
android:textSize="12sp" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
Loading…
x
Reference in New Issue
Block a user