Android: Controller binding support

This commit is contained in:
Connor McLaughlin
2020-12-27 19:39:59 +10:00
parent 6bf37f51be
commit 0aa3b6b399
22 changed files with 1088 additions and 117 deletions

View File

@@ -0,0 +1,9 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/settings"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<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="match_parent"
android:orientation="vertical">
<com.google.android.material.tabs.TabLayout
android:id="@+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabTextAppearance="@style/TabTextAppearance"
app:tabMode="fixed" />
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
</LinearLayout>

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:id="@+id/controller_binding_icon"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginTop="0dp"
android:layout_alignParentTop="true"
tools:srcCompat="@drawable/ic_media_cdrom" />
<TextView
android:id="@+id/controller_binding_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="0dp"
android:text="Up"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
android:layout_alignParentTop="true"
android:layout_toRightOf="@id/controller_binding_icon" />
<TextView
android:id="@+id/controller_binding_value"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="Controller0/Button0"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:layout_toRightOf="@id/controller_binding_icon"
android:layout_below="@id/controller_binding_name" />
</RelativeLayout>