Added Android code
[wl-app.git] / Android / app / src / main / res / layout / fragment_single_news.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <android.support.design.widget.CoordinatorLayout android:id="@+id/clMainView"
3                                                  xmlns:android="http://schemas.android.com/apk/res/android"
4                                                  xmlns:app="http://schemas.android.com/apk/res-auto"
5                                                  android:layout_width="match_parent"
6                                                  android:layout_height="match_parent">
7
8     <android.support.design.widget.AppBarLayout
9         android:id="@+id/app_bar_layout"
10         android:layout_width="match_parent"
11         android:layout_height="wrap_content"
12         app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
13
14         <android.support.design.widget.CollapsingToolbarLayout
15             android:id="@+id/ctlCollapse"
16             android:layout_width="match_parent"
17             android:layout_height="@dimen/news_header_height"
18             app:contentScrim="?attr/colorPrimary"
19             app:expandedTitleTextAppearance="@android:color/transparent"
20             app:layout_scrollFlags="snap">
21
22             <include
23                 layout="@layout/fragment_single_news_header"
24                 app:layout_collapseMode="parallax"/>
25
26             <android.support.v7.widget.Toolbar
27                 android:id="@+id/bookToolbar"
28                 android:layout_width="match_parent"
29                 android:layout_height="?attr/actionBarSize"
30                 android:minHeight="?attr/actionBarSize"
31                 app:layout_collapseMode="pin"
32                 app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/>
33
34         </android.support.design.widget.CollapsingToolbarLayout>
35
36     </android.support.design.widget.AppBarLayout>
37
38     <android.support.v4.widget.NestedScrollView
39         android:layout_width="match_parent"
40         android:layout_height="wrap_content"
41         android:layout_gravity="fill_vertical"
42         android:fillViewport="true"
43         app:layout_behavior="@string/appbar_scrolling_view_behavior">
44
45         <LinearLayout
46             android:id="@+id/llContentContainer"
47             android:layout_width="match_parent"
48             android:layout_height="wrap_content"
49             android:orientation="vertical"
50             android:padding="20dp">
51
52             <TextView
53                 android:id="@+id/tvNewsTitle"
54                 style="@style/NewsHeaderTextView"
55                 android:layout_width="match_parent"
56                 android:layout_height="wrap_content"
57                 android:layout_marginBottom="15dp"/>
58
59             <TextView
60                 style="@style/NewsText.Black"
61                 android:layout_width="match_parent"
62                 android:layout_height="wrap_content"
63                 android:text="@string/news_when"/>
64
65             <TextView
66                 android:id="@+id/tvNewsTime"
67                 style="@style/NewsText.TurquoiseBold"
68                 android:layout_width="match_parent"
69                 android:layout_height="wrap_content"/>
70
71             <TextView
72                 style="@style/NewsText.Black"
73                 android:layout_width="match_parent"
74                 android:layout_height="wrap_content"
75                 android:text="@string/news_where"/>
76
77             <TextView
78                 android:id="@+id/tvNewsPlace"
79                 style="@style/NewsText.TurquoiseBold"
80                 android:layout_width="match_parent"
81                 android:layout_height="wrap_content"/>
82
83             <org.sufficientlysecure.htmltextview.HtmlTextView
84                 android:id="@+id/tvNewsBody"
85                 style="@style/NewsText.Black"
86                 android:layout_width="match_parent"
87                 android:layout_height="wrap_content"
88                 android:layout_marginBottom="?attr/actionBarSize"
89                 android:layout_marginTop="15dp"/>
90
91         </LinearLayout>
92
93     </android.support.v4.widget.NestedScrollView>
94
95     <android.support.design.widget.FloatingActionButton
96         android:id="@+id/fabShare"
97         android:layout_width="wrap_content"
98         android:layout_height="wrap_content"
99         android:layout_marginEnd="25dp"
100         android:src="@drawable/ic_share"
101         android:tint="@color/orange"
102         app:backgroundTint="@color/white"
103         app:elevation="6dp"
104         app:layout_anchor="@id/app_bar_layout"
105         app:layout_anchorGravity="bottom|end"
106         app:pressedTranslationZ="8dp"/>
107
108 </android.support.design.widget.CoordinatorLayout>