Skip to content

Commit

Permalink
Replace android:src with app:srcCompat
Browse files Browse the repository at this point in the history
  • Loading branch information
udenr committed Feb 19, 2024
1 parent 9e66e8d commit e12cead
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 72 deletions.
25 changes: 13 additions & 12 deletions app/src/main/res/layout-land/content_main.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:id="@+id/main_content"
<LinearLayout android:id="@+id/main_content"
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"
Expand Down Expand Up @@ -35,7 +34,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/activity_vertical_margin"
android:rotation="90"/>
android:rotation="90" />

<ImageView
android:id="@+id/mode_arrow_left"
Expand All @@ -47,18 +46,19 @@
android:padding="@dimen/activity_vertical_margin"
android:layout_centerHorizontal="true"
android:onClick="onClick"
android:rotation="90"/>
android:rotation="90" />

<ImageView
android:id="@+id/mode_arrow_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_keyboard_arrow_right_black_24dp"
app:srcCompat="@drawable/ic_keyboard_arrow_right_black_24dp"
android:layout_alignParentBottom="true"
android:padding="@dimen/activity_vertical_margin"
android:layout_marginEnd="@dimen/activity_horizontal_margin"
android:layout_centerHorizontal="true"
android:onClick="onClick"
android:rotation="90"/>
android:rotation="90" />
</RelativeLayout>

<RelativeLayout
Expand All @@ -81,30 +81,31 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/activity_vertical_margin"
android:rotation="90"/>
android:rotation="90" />

<ImageView
android:id="@+id/size_arrow_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/activity_vertical_margin"
android:src="@drawable/ic_keyboard_arrow_left_black_24dp"
app:srcCompat="@drawable/ic_keyboard_arrow_left_black_24dp"
android:layout_alignParentTop="true"
android:padding="@dimen/activity_vertical_margin"
android:layout_centerHorizontal="true"
android:onClick="onClick"
android:rotation="90" />

<ImageView
android:id="@+id/size_arrow_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_keyboard_arrow_right_black_24dp"
app:srcCompat="@drawable/ic_keyboard_arrow_right_black_24dp"
android:layout_alignParentBottom="true"
android:padding="@dimen/activity_vertical_margin"
android:layout_marginEnd="@dimen/activity_horizontal_margin"
android:layout_centerHorizontal="true"
android:onClick="onClick"
android:rotation="90"/>
android:rotation="90" />
</RelativeLayout>

<LinearLayout
Expand All @@ -122,7 +123,7 @@
android:background="@drawable/button_normal"
android:text="@string/main_button_quick_start"
android:id="@+id/quick_start_button"
android:onClick="onClick"/>
android:onClick="onClick" />

<Button
android:layout_marginBottom="@dimen/activity_vertical_margin"
Expand All @@ -132,7 +133,7 @@
android:background="@drawable/button_fullwidth"
android:text="@string/custom_game"
android:id="@+id/action_settings"
android:onClick="onClick"/>
android:onClick="onClick" />

</LinearLayout>

Expand Down
31 changes: 16 additions & 15 deletions app/src/main/res/layout-land/content_place_ship.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">

<GridView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/placement_gridview"
Expand All @@ -10,7 +11,7 @@
android:verticalSpacing="1px"
android:horizontalSpacing="1px"
android:stretchMode="columnWidth"
android:layout_weight="1"/>
android:layout_weight="1" />

<LinearLayout
android:id="@+id/game_linear_layout"
Expand All @@ -31,10 +32,10 @@
android:id="@+id/arrow_left"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:src="@drawable/arrow_left_black"
app:srcCompat="@drawable/arrow_left_black"
android:adjustViewBounds="true"
android:onClick="onClickButton"
android:layout_gravity="center_vertical"/>
android:layout_gravity="center_vertical" />

<LinearLayout
android:layout_width="wrap_content"
Expand All @@ -46,30 +47,30 @@
android:id="@+id/arrow_up"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:src="@drawable/arrow_up_black"
app:srcCompat="@drawable/arrow_up_black"
android:adjustViewBounds="true"
android:onClick="onClickButton"
android:layout_weight="1"/>
android:layout_weight="1" />

<ImageView
android:id="@+id/arrow_down"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:src="@drawable/arrow_down_black"
app:srcCompat="@drawable/arrow_down_black"
android:adjustViewBounds="true"
android:onClick="onClickButton"
android:layout_weight="1"/>
android:layout_weight="1" />

</LinearLayout>

<ImageView
android:id="@+id/arrow_right"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:src="@drawable/arrow_right_black"
app:srcCompat="@drawable/arrow_right_black"
android:adjustViewBounds="true"
android:onClick="onClickButton"
android:layout_gravity="center_vertical"/>
android:layout_gravity="center_vertical" />

</LinearLayout>

Expand All @@ -83,11 +84,11 @@
android:id="@+id/rotate_right"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:src="@drawable/arrow_rotate_right_black"
app:srcCompat="@drawable/arrow_rotate_right_black"
android:adjustViewBounds="true"
android:onClick="onClickButton"
android:layout_weight="1"
android:layout_gravity="center_vertical"/>
android:layout_gravity="center_vertical" />

<androidx.legacy.widget.Space
android:layout_width="50dp"
Expand All @@ -97,11 +98,11 @@
android:id="@+id/rotate_left"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:src="@drawable/arrow_rotate_left_black"
app:srcCompat="@drawable/arrow_rotate_left_black"
android:adjustViewBounds="true"
android:onClick="onClickButton"
android:layout_weight="1"
android:layout_gravity="center_vertical"/>
android:layout_gravity="center_vertical" />

</LinearLayout>

Expand All @@ -115,7 +116,7 @@
android:layout_marginBottom="@dimen/activity_vertical_margin"
android:background="@drawable/button_fullwidth"
android:textColor="@color/white"
android:onClick="onClickReady"/>
android:onClick="onClickReady" />

</LinearLayout>

Expand Down
9 changes: 5 additions & 4 deletions app/src/main/res/layout-land/fragment_mode_main.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
Expand All @@ -13,7 +13,8 @@
android:rotation="-90"
tools:context="org.secuso.privacyfriendlybattleship.ui.MainActivity$GameModeFragment">

<TextView android:id="@+id/section_label"
<TextView
android:id="@+id/section_label"
android:text="Label"
android:textStyle="bold"
android:textSize="18sp"
Expand All @@ -27,7 +28,7 @@
android:layout_width="match_parent"
android:adjustViewBounds="true"
android:layout_centerInParent="true"
android:src="@drawable/ic_person_black_24px"
android:layout_height="0dp"/>
app:srcCompat="@drawable/ic_person_black_24px"
android:layout_height="0dp" />

</LinearLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/layout-land/fragment_size_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
android:layout_height="wrap_content"
android:id="@+id/select_size"
android:layout_weight="1"
android:gravity="center"/>
android:gravity="center" />
</LinearLayout>
25 changes: 14 additions & 11 deletions app/src/main/res/layout-xlarge/content_main.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:id="@+id/main_content"
<LinearLayout android:id="@+id/main_content"
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"
Expand All @@ -20,6 +19,7 @@
android:layout_height="0dp"
android:layoutDirection="ltr"
android:layout_weight="4">

<androidx.viewpager.widget.ViewPager
android:id="@+id/modeScroller"
android:layout_width="match_parent"
Expand Down Expand Up @@ -48,26 +48,28 @@
android:layout_marginStart="@dimen/activity_horizontal_margin"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_centerVertical="true"
android:onClick="onClick"/>
android:onClick="onClick" />

<ImageView
android:id="@+id/mode_arrow_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_keyboard_arrow_right_black_24dp"
app:srcCompat="@drawable/ic_keyboard_arrow_right_black_24dp"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:padding="@dimen/activity_horizontal_margin"
android:layout_marginEnd="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_centerVertical="true"
android:onClick="onClick"/>
android:onClick="onClick" />
</RelativeLayout>

<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layoutDirection="ltr"
android:layout_weight="4">

<TextView
android:id="@+id/title_size"
android:layout_width="wrap_content"
Expand All @@ -89,26 +91,27 @@
android:id="@+id/size_arrow_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_keyboard_arrow_left_black_24dp"
app:srcCompat="@drawable/ic_keyboard_arrow_left_black_24dp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:padding="@dimen/activity_horizontal_margin"
android:layout_marginStart="@dimen/activity_horizontal_margin"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_centerVertical="true"
android:onClick="onClick"/>
android:onClick="onClick" />

<ImageView
android:id="@+id/size_arrow_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_keyboard_arrow_right_black_24dp"
app:srcCompat="@drawable/ic_keyboard_arrow_right_black_24dp"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:padding="@dimen/activity_horizontal_margin"
android:layout_marginEnd="@dimen/activity_horizontal_margin"
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:layout_centerVertical="true"
android:onClick="onClick"/>
android:onClick="onClick" />
</RelativeLayout>

<Button
Expand All @@ -119,7 +122,7 @@
android:background="@drawable/button_normal"
android:text="@string/main_button_quick_start"
android:id="@+id/quick_start_button"
android:onClick="onClick"/>
android:onClick="onClick" />

<Button
android:layout_width="match_parent"
Expand All @@ -128,6 +131,6 @@
android:background="@drawable/button_fullwidth"
android:text="@string/custom_game"
android:id="@+id/action_settings"
android:onClick="onClick"/>
android:onClick="onClick" />

</LinearLayout>
18 changes: 9 additions & 9 deletions app/src/main/res/layout/content_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="org.secuso.privacyfriendlybattleship.ui.MainActivity">

Expand Down Expand Up @@ -41,11 +41,11 @@
android:id="@+id/mode_arrow_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginStart="@dimen/activity_horizontal_margin"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:onClick="onClick"
android:padding="@dimen/activity_horizontal_margin"
app:srcCompat="@drawable/ic_keyboard_arrow_left_black_24dp" />
Expand All @@ -61,7 +61,7 @@
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:onClick="onClick"
android:padding="@dimen/activity_horizontal_margin"
android:src="@drawable/ic_keyboard_arrow_right_black_24dp" />
app:srcCompat="@drawable/ic_keyboard_arrow_right_black_24dp" />
</RelativeLayout>

<RelativeLayout
Expand Down Expand Up @@ -91,14 +91,14 @@
android:id="@+id/size_arrow_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:layout_marginStart="@dimen/activity_horizontal_margin"
android:layout_marginLeft="@dimen/activity_horizontal_margin"
android:onClick="onClick"
android:padding="@dimen/activity_horizontal_margin"
android:src="@drawable/ic_keyboard_arrow_left_black_24dp" />
app:srcCompat="@drawable/ic_keyboard_arrow_left_black_24dp" />

<ImageView
android:id="@+id/size_arrow_right"
Expand All @@ -111,7 +111,7 @@
android:layout_marginRight="@dimen/activity_horizontal_margin"
android:onClick="onClick"
android:padding="@dimen/activity_horizontal_margin"
android:src="@drawable/ic_keyboard_arrow_right_black_24dp" />
app:srcCompat="@drawable/ic_keyboard_arrow_right_black_24dp" />
</RelativeLayout>

<Button
Expand Down
Loading

0 comments on commit e12cead

Please sign in to comment.