Added Android code
[wl-app.git] / Android / app / src / main / res / layout / fragment_single_news.xml
diff --git a/Android/app/src/main/res/layout/fragment_single_news.xml b/Android/app/src/main/res/layout/fragment_single_news.xml
new file mode 100644 (file)
index 0000000..75c552e
--- /dev/null
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.design.widget.CoordinatorLayout android:id="@+id/clMainView"
+                                                 xmlns:android="http://schemas.android.com/apk/res/android"
+                                                 xmlns:app="http://schemas.android.com/apk/res-auto"
+                                                 android:layout_width="match_parent"
+                                                 android:layout_height="match_parent">
+
+    <android.support.design.widget.AppBarLayout
+        android:id="@+id/app_bar_layout"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
+
+        <android.support.design.widget.CollapsingToolbarLayout
+            android:id="@+id/ctlCollapse"
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/news_header_height"
+            app:contentScrim="?attr/colorPrimary"
+            app:expandedTitleTextAppearance="@android:color/transparent"
+            app:layout_scrollFlags="snap">
+
+            <include
+                layout="@layout/fragment_single_news_header"
+                app:layout_collapseMode="parallax"/>
+
+            <android.support.v7.widget.Toolbar
+                android:id="@+id/bookToolbar"
+                android:layout_width="match_parent"
+                android:layout_height="?attr/actionBarSize"
+                android:minHeight="?attr/actionBarSize"
+                app:layout_collapseMode="pin"
+                app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/>
+
+        </android.support.design.widget.CollapsingToolbarLayout>
+
+    </android.support.design.widget.AppBarLayout>
+
+    <android.support.v4.widget.NestedScrollView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_gravity="fill_vertical"
+        android:fillViewport="true"
+        app:layout_behavior="@string/appbar_scrolling_view_behavior">
+
+        <LinearLayout
+            android:id="@+id/llContentContainer"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="vertical"
+            android:padding="20dp">
+
+            <TextView
+                android:id="@+id/tvNewsTitle"
+                style="@style/NewsHeaderTextView"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginBottom="15dp"/>
+
+            <TextView
+                style="@style/NewsText.Black"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:text="@string/news_when"/>
+
+            <TextView
+                android:id="@+id/tvNewsTime"
+                style="@style/NewsText.TurquoiseBold"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"/>
+
+            <TextView
+                style="@style/NewsText.Black"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:text="@string/news_where"/>
+
+            <TextView
+                android:id="@+id/tvNewsPlace"
+                style="@style/NewsText.TurquoiseBold"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"/>
+
+            <org.sufficientlysecure.htmltextview.HtmlTextView
+                android:id="@+id/tvNewsBody"
+                style="@style/NewsText.Black"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginBottom="?attr/actionBarSize"
+                android:layout_marginTop="15dp"/>
+
+        </LinearLayout>
+
+    </android.support.v4.widget.NestedScrollView>
+
+    <android.support.design.widget.FloatingActionButton
+        android:id="@+id/fabShare"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginEnd="25dp"
+        android:src="@drawable/ic_share"
+        android:tint="@color/orange"
+        app:backgroundTint="@color/white"
+        app:elevation="6dp"
+        app:layout_anchor="@id/app_bar_layout"
+        app:layout_anchorGravity="bottom|end"
+        app:pressedTranslationZ="8dp"/>
+
+</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file