Magisk/app/src/main/res/layout/item_developer.xml

58 lines
2.2 KiB
XML
Raw Normal View History

2019-10-02 16:15:16 +00:00
<?xml version="1.0" encoding="utf-8"?>
<layout 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">
2019-10-05 10:42:27 +00:00
<data>
<variable
name="item"
type="com.topjohnwu.magisk.model.entity.recycler.HomeItem" />
<variable
name="viewModel"
type="com.topjohnwu.magisk.redesign.home.HomeViewModel" />
</data>
2019-10-02 16:15:16 +00:00
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2019-10-05 10:42:27 +00:00
android:background="?selectableItemBackground"
android:onClick="@{() -> viewModel.onLinkPressed(item.link)}"
2019-10-02 16:15:16 +00:00
tools:layout_gravity="center"
2019-10-05 10:42:27 +00:00
android:padding="@dimen/l_50">
2019-10-02 16:15:16 +00:00
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/developer_link"
style="?styleImageNormal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
2019-10-05 10:42:27 +00:00
app:srcCompat="@{item.icon}"
tools:srcCompat="@drawable/ic_paypal" />
2019-10-02 16:15:16 +00:00
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/developer_link_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/l_50"
2019-10-05 10:42:27 +00:00
android:text="@{item.title}"
2019-10-02 16:15:16 +00:00
android:textAppearance="?appearanceTextCaptionNormal"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/developer_link"
tools:text="Paypal" />
<androidx.appcompat.widget.AppCompatImageView
style="?styleImageSmall"
2019-10-05 10:42:27 +00:00
android:layout_height="14sp"
2019-10-02 16:15:16 +00:00
app:layout_constraintBottom_toBottomOf="@+id/developer_link_name"
app:layout_constraintStart_toEndOf="@+id/developer_link_name"
app:layout_constraintTop_toTopOf="@+id/developer_link_name"
app:srcCompat="@drawable/ic_more"
app:tint="?colorTextTransient" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>