Added Android code
[wl-app.git] / Android / folioreader / res / layout / layout_dictionary.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3     xmlns:app="http://schemas.android.com/apk/res-auto"
4     android:layout_width="match_parent"
5     android:layout_height="match_parent">
6
7     <android.support.v7.widget.Toolbar
8         android:id="@+id/toolbar"
9         android:layout_width="match_parent"
10         android:layout_height="?attr/actionBarSize"
11         android:layout_margin="0dp"
12         android:alpha="0.8"
13         android:background="@color/white"
14         android:padding="0dp"
15         android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
16         app:contentInsetEnd="0dp"
17         app:contentInsetLeft="0dp"
18         app:contentInsetRight="0dp"
19         app:contentInsetStart="0dp">
20
21         <RelativeLayout
22             android:layout_width="match_parent"
23             android:layout_height="56dp">
24
25             <ImageView
26                 android:id="@+id/btn_close"
27                 android:layout_width="wrap_content"
28                 android:layout_height="wrap_content"
29                 android:layout_alignParentLeft="true"
30                 android:layout_centerInParent="true"
31                 android:layout_margin="16dp"
32                 android:scaleType="centerCrop"
33                 android:src="@drawable/ic_close_green_24dp" />
34
35             <LinearLayout
36                 android:layout_width="170dp"
37                 android:layout_height="wrap_content"
38                 android:layout_centerHorizontal="true"
39                 android:layout_centerInParent="true"
40                 android:background="@drawable/btn_contents_highlights"
41                 android:orientation="horizontal"
42                 android:padding="1.8dp">
43
44                 <TextView
45                     android:id="@+id/btn_dictionary"
46                     android:layout_width="0dp"
47                     android:layout_height="match_parent"
48                     android:layout_weight="1"
49                     android:background="@drawable/style_back_color_selector"
50                     android:gravity="center|end"
51                     android:padding="5dp"
52                     android:text="@string/dictionary"
53                     android:textColor="@drawable/content_highlight_text_selector"
54                     android:textSize="16sp" />
55
56                 <TextView
57                     android:id="@+id/btn_wikipedia"
58                     android:layout_width="0dp"
59                     android:layout_height="match_parent"
60                     android:layout_weight="1"
61                     android:background="@drawable/style_back_color_selector"
62                     android:gravity="center|start"
63                     android:padding="5dp"
64                     android:text="@string/wikipedia"
65                     android:textColor="@drawable/content_highlight_text_selector"
66                     android:textSize="16sp" />
67             </LinearLayout>
68         </RelativeLayout>
69     </android.support.v7.widget.Toolbar>
70
71     <RelativeLayout
72         android:layout_width="match_parent"
73         android:layout_height="match_parent"
74         android:layout_below="@+id/toolbar">
75
76         <android.support.v7.widget.RecyclerView
77             android:id="@+id/rv_dict_results"
78             android:layout_width="match_parent"
79             android:layout_height="match_parent"
80             android:scrollbars="vertical" />
81
82         <include layout="@layout/layout_wikipedia" />
83
84         <ProgressBar
85             android:id="@+id/progress"
86             android:layout_width="wrap_content"
87             android:layout_height="wrap_content"
88             android:layout_centerInParent="true" />
89
90         <TextView
91             android:id="@+id/no_network"
92             android:layout_width="wrap_content"
93             android:layout_height="wrap_content"
94             android:layout_centerInParent="true"
95             android:drawablePadding="8dp"
96             android:drawableTop="@drawable/ic_offline_gray_48dp"
97             android:text="offline"
98             android:visibility="gone" />
99
100         <Button
101             android:id="@+id/btn_google_search"
102             android:layout_width="wrap_content"
103             android:layout_height="wrap_content"
104             android:layout_below="@+id/no_network"
105             android:layout_centerHorizontal="true"
106             android:layout_marginTop="8dp"
107             android:background="@drawable/round_button"
108             android:padding="8dp"
109             android:text="Google search"
110             android:visibility="gone" />
111
112     </RelativeLayout>
113 </RelativeLayout>