diff options
author | Clyhtsuriva <aimeric@adjutor.xyz> | 2021-02-17 08:00:07 +0100 |
---|---|---|
committer | Clyhtsuriva <aimeric@adjutor.xyz> | 2021-02-17 08:00:07 +0100 |
commit | d49771c90315897e0fe6eb8d4034e36853bf6650 (patch) | |
tree | 394125738b1ff504026528fcd9adbbc2cc5ae078 /app/src/main/res | |
parent | 7288d5ae154f895d71727acc92828aa555e8108b (diff) |
Trying to mimic the Flower exemple from google.
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/layout/item_layout.xml | 34 | ||||
-rw-r--r-- | app/src/main/res/layout/row_layout.xml | 47 | ||||
-rw-r--r-- | app/src/main/res/layout/top_manga_page.xml | 9 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 21 |
4 files changed, 39 insertions, 72 deletions
diff --git a/app/src/main/res/layout/item_layout.xml b/app/src/main/res/layout/item_layout.xml index e03e874..c4b662c 100644 --- a/app/src/main/res/layout/item_layout.xml +++ b/app/src/main/res/layout/item_layout.xml @@ -2,6 +2,7 @@ <androidx.cardview.widget.CardView 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/cv_cardView" android:layout_width="match_parent" android:layout_height="wrap_content" @@ -10,10 +11,10 @@ android:focusable="true" android:foreground="?selectableItemBackground" app:cardCornerRadius="10dp" + app:cardBackgroundColor="@color/black" > - <RelativeLayout - android:id="@+id/rl_wrapper" + <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" android:layout_height="match_parent" android:padding="20dp" @@ -23,30 +24,25 @@ android:id="@+id/iv_image" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_centerVertical="true" - android:layout_margin="10dp" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintStart_toStartOf="parent" android:src="@mipmap/ic_launcher_round" android:contentDescription="@string/rv_image" /> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="match_parent" - android:layout_alignTop="@id/iv_image" - android:layout_alignBottom="@id/iv_image" - android:layout_toEndOf="@id/iv_image" - android:orientation="vertical" - > - <TextView android:id="@+id/tv_title" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginStart="10dp" + app:layout_constraintStart_toEndOf="@id/iv_image" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" android:text="@string/rv_title" android:textColor="@color/strong_pink" - android:textSize="20sp"/> + android:textSize="30sp"/> - <TextView + <!--TextView android:id="@+id/tv_description" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -54,10 +50,8 @@ android:text="@string/rv_description" android:textColor="@color/slightly_desaturated_magenta" android:textSize="20sp" - /> - - </LinearLayout> + /--> - </RelativeLayout> + </androidx.constraintlayout.widget.ConstraintLayout> </androidx.cardview.widget.CardView>
\ No newline at end of file diff --git a/app/src/main/res/layout/row_layout.xml b/app/src/main/res/layout/row_layout.xml deleted file mode 100644 index 1c74476..0000000 --- a/app/src/main/res/layout/row_layout.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<androidx.constraintlayout.widget.ConstraintLayout - xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:tools="http://schemas.android.com/tools" - xmlns:app="http://schemas.android.com/apk/res-auto" - android:layout_width="match_parent" - android:layout_height="?android:attr/listPreferredItemHeight" - android:layout_marginStart="?android:attr/listPreferredItemPaddingLeft" - android:layout_marginEnd="?android:attr/listPreferredItemPaddingRight" - android:gravity="center_vertical" - android:padding="6dip"> - -<ImageView - android:id="@+id/icon" - android:layout_width="wrap_content" - android:layout_height="fill_parent" - android:layout_alignParentBottom="true" - android:layout_alignParentTop="true" - android:layout_marginEnd="6dip" - android:contentDescription="@string/rv_image" - android:src="@mipmap/ic_launcher" - tools:ignore="MissingConstraints" /> - -<TextView - android:id="@+id/secondLine" - android:layout_height="26dip" - android:ellipsize="marquee" - android:text="@string/rv_description" - android:textSize="12sp" - app:layout_constraintStart_toEndOf="@id/icon" - app:layout_constraintTop_toBottomOf="@id/firstLine" - android:layout_width="0dp" /> - -<TextView - android:id="@+id/firstLine" - android:layout_height="wrap_content" - android:layout_toEndOf="@id/icon" - android:gravity="center_vertical" - android:text="@string/rv_title" - android:textSize="16sp" - app:layout_constraintStart_toEndOf="@id/icon" - app:layout_constraintEnd_toEndOf="parent" - android:layout_width="0dp" - tools:ignore="MissingConstraints" /> - - -</androidx.constraintlayout.widget.ConstraintLayout> diff --git a/app/src/main/res/layout/top_manga_page.xml b/app/src/main/res/layout/top_manga_page.xml index f8d2510..4a807f1 100644 --- a/app/src/main/res/layout/top_manga_page.xml +++ b/app/src/main/res/layout/top_manga_page.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" +<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" @@ -11,10 +12,10 @@ android:id="@+id/recycler_view" android:layout_width="0dp" android:layout_height="0dp" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintEnd_toEndOf="parent" app:layout_constraintBottom_toTopOf="@+id/home" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" tools:listitem="@layout/item_layout" /> <Button diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index a16e804..41bd064 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,7 +1,6 @@ <resources> <string name="app_name">Aniki</string> <string name="action_settings">Settings</string> - <!-- Strings used for fragments for navigation --> <string name="hello_second_fragment">Hello second fragment. Arg: %1$s</string> <string name="info">Infos about the developper of the app.</string> @@ -16,4 +15,24 @@ <string name="rv_title">Title</string> <string name="rv_description">This is a description</string> <string name="rv_image">image</string> + <string name="manga_image_content_description">Image of manga</string> + + <string-array name="manga_array"> + <item>Dragon Ball</item> + <item>Naruto</item> + <item>Fairy Tail</item> + <item>Shokugeki no Souma</item> + <item>Ajin</item> + <item>Komi-san no Komyushu</item> + <item>Hunter x Hunter</item> + <item>Detective Conan</item> + <item>Swortd Art Online</item> + <item>Scumbag Loser</item> + <item>Ana Satsujin</item> + <item>Samurai Deeper Kyou</item> + <item>Sebsei, Ore ni Kamawazu Itte Kudasai!!</item> + </string-array> + + <string name="manga1_name">Dragon Ball</string> + </resources>
\ No newline at end of file |