Added primaryPlayer functionality
Added a new functionality to mark one player as the primary player. This player is the main user of the app and the training data will be stored for that player only.
This commit is contained in:
14
app/src/main/res/drawable/ic_favorite_profile.xml
Normal file
14
app/src/main/res/drawable/ic_favorite_profile.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<!-- Outline version for unselected state -->
|
||||
<path
|
||||
android:strokeColor="@color/text_dim"
|
||||
android:strokeWidth="1.5"
|
||||
android:strokeLineJoin="round"
|
||||
android:strokeLineCap="round"
|
||||
android:pathData="M5,16 L3,5 L8.5,10 L12,4 L15.5,10 L21,5 L19,16 L5,16 Z M5,18 L19,18" />
|
||||
</vector>
|
||||
@@ -61,6 +61,39 @@
|
||||
android:textColor="@color/text_primary" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<!-- Primary User Toggle -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:background="@color/surface_secondary"
|
||||
android:padding="16dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivPrimaryUserIcon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_favorite_profile"
|
||||
app:tint="@color/text_dim" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="12dp"
|
||||
android:text="@string/txt_primary_user_label"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||
android:id="@+id/switchPrimaryUser"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnShowStats"
|
||||
style="@style/Widget.Oche_Button_Primary"
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
<string name="txt_create_profile_username_hint">Add your username</string>
|
||||
<string name="txt_create_profile_username_save">Save to Squad</string>
|
||||
<string name="txt_create_profile_show_stats">Show Stats</string>
|
||||
<string name="txt_primary_user_label">Set as Primary User</string>
|
||||
<string name="txt_update_profile_header">Update Profile</string>
|
||||
<string name="txt_update_profile_username_save">Update Squad</string>
|
||||
<string name="txt_cancel_crop">Cancel</string>
|
||||
|
||||
Reference in New Issue
Block a user