aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/layout/activity_main.xml3
-rw-r--r--app/src/main/res/layout/item_layout.xml63
-rw-r--r--app/src/main/res/layout/row_layout.xml47
-rw-r--r--app/src/main/res/layout/top_manga_page.xml21
-rw-r--r--app/src/main/res/values/strings.xml3
5 files changed, 126 insertions, 11 deletions
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index b0826f8..12a61d8 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
-<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.coordinatorlayout.widget.CoordinatorLayout
+ 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"
diff --git a/app/src/main/res/layout/item_layout.xml b/app/src/main/res/layout/item_layout.xml
new file mode 100644
index 0000000..e03e874
--- /dev/null
+++ b/app/src/main/res/layout/item_layout.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.cardview.widget.CardView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:id="@+id/cv_cardView"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_margin="4dp"
+ android:clickable="true"
+ android:focusable="true"
+ android:foreground="?selectableItemBackground"
+ app:cardCornerRadius="10dp"
+ >
+
+ <RelativeLayout
+ android:id="@+id/rl_wrapper"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:padding="20dp"
+ >
+
+ <ImageView
+ android:id="@+id/iv_image"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerVertical="true"
+ android:layout_margin="10dp"
+ 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"
+ android:text="@string/rv_title"
+ android:textColor="@color/strong_pink"
+ android:textSize="20sp"/>
+
+ <TextView
+ android:id="@+id/tv_description"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="10dp"
+ android:text="@string/rv_description"
+ android:textColor="@color/slightly_desaturated_magenta"
+ android:textSize="20sp"
+ />
+
+ </LinearLayout>
+
+
+ </RelativeLayout>
+</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
new file mode 100644
index 0000000..1c74476
--- /dev/null
+++ b/app/src/main/res/layout/row_layout.xml
@@ -0,0 +1,47 @@
+<?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 6a2f86b..f8d2510 100644
--- a/app/src/main/res/layout/top_manga_page.xml
+++ b/app/src/main/res/layout/top_manga_page.xml
@@ -5,17 +5,17 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".TopMangaPage"
- android:background="@color/very_dark_purple"
- >
+ android:background="@color/very_dark_purple">
- <TextView
- android:id="@+id/textview_second"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- app:layout_constraintBottom_toTopOf="@id/home"
- app:layout_constraintEnd_toEndOf="parent"
+ <androidx.recyclerview.widget.RecyclerView
+ 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_constraintTop_toTopOf="parent" />
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintBottom_toTopOf="@+id/home"
+ tools:listitem="@layout/item_layout" />
<Button
android:id="@+id/home"
@@ -25,5 +25,6 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@id/textview_second" />
+ />
+
</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index e076855..a16e804 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -13,4 +13,7 @@
<string name="news_page_label">News Page</string>
<string name="article_page_label">Article Page</string>
<string name="top_manga_page_label">Top Manga Page</string>
+ <string name="rv_title">Title</string>
+ <string name="rv_description">This is a description</string>
+ <string name="rv_image">image</string>
</resources> \ No newline at end of file