Added Android code
[wl-app.git] / Android / app / src / main / res / layout / news_item.xml
diff --git a/Android/app/src/main/res/layout/news_item.xml b/Android/app/src/main/res/layout/news_item.xml
new file mode 100644 (file)
index 0000000..90d0074
--- /dev/null
@@ -0,0 +1,55 @@
+<?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:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:padding="10dp">
+
+    <android.support.v7.widget.CardView
+        android:id="@+id/cvNewsThumb"
+        android:layout_width="@dimen/thumb_size"
+        android:layout_height="@dimen/thumb_size"
+        android:layout_centerVertical="true"
+        app:cardCornerRadius="@dimen/thumb_corners">
+
+        <ImageView
+            android:id="@+id/ivNewsThumb"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:scaleType="centerCrop"
+            android:src="@drawable/list_nocover"
+            tools:ignore="ContentDescription"/>
+    </android.support.v7.widget.CardView>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="@dimen/news_text_box_padding"
+        android:layout_toEndOf="@id/cvNewsThumb"
+        android:orientation="vertical"
+        android:paddingBottom="5dp"
+        android:paddingTop="5dp"
+        tools:ignore="SpUsage">
+
+        <TextView
+            android:id="@+id/textViewDate"
+            style="@style/NewsText.Black"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textAllCaps="true"
+            android:textSize="15dp"/>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="1dp"
+            android:background="@color/gray_dark"/>
+
+        <TextView
+            android:id="@+id/textViewLead"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textColor="@color/colorPrimary"
+            android:textSize="18dp"/>
+    </LinearLayout>
+</RelativeLayout>
\ No newline at end of file