fragment_sidebar_main.xml 7.92 KB
Newer Older
1
<?xml version="1.0" encoding="utf-8"?>
Tiago Cunha's avatar
Tiago Cunha committed
2
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
Yusuke Iwaki's avatar
Yusuke Iwaki committed
3
        xmlns:tools="http://schemas.android.com/tools"
4
        xmlns:app="http://schemas.android.com/apk/res-auto"
Yusuke Iwaki's avatar
Yusuke Iwaki committed
5 6
        android:layout_width="match_parent"
        android:layout_height="match_parent"
Tiago Cunha's avatar
Tiago Cunha committed
7 8 9
        android:theme="@style/AppTheme.Dark"
        android:visibility="invisible"
        tools:visibility="visible">
10 11

    <LinearLayout
Yusuke Iwaki's avatar
Yusuke Iwaki committed
12 13
            android:id="@+id/user_info_container"
            android:layout_width="match_parent"
Tiago Cunha's avatar
Tiago Cunha committed
14
            android:layout_height="?attr/actionBarSize"
Yusuke Iwaki's avatar
Yusuke Iwaki committed
15 16 17 18 19 20
            android:layout_alignParentTop="true"
            android:background="?attr/colorPrimaryDark"
            android:elevation="2dp"
            android:foreground="?attr/selectableItemBackground"
            android:gravity="center_vertical"
            android:orientation="horizontal"
Tiago Cunha's avatar
Tiago Cunha committed
21 22 23 24
            android:paddingBottom="@dimen/margin_8"
            android:paddingTop="@dimen/margin_8"
            android:paddingLeft="@dimen/margin_16"
            android:paddingRight="@dimen/margin_16">
Tiago Cunha's avatar
Tiago Cunha committed
25 26

        <ImageView
Yusuke Iwaki's avatar
Yusuke Iwaki committed
27 28 29
                android:id="@+id/current_user_status"
                android:layout_width="8dp"
                android:layout_height="8dp"
Tiago Cunha's avatar
Tiago Cunha committed
30
                android:src="@drawable/userstatus_online" />
Tiago Cunha's avatar
Tiago Cunha committed
31 32

        <Space
Yusuke Iwaki's avatar
Yusuke Iwaki committed
33
                android:layout_width="@dimen/margin_8"
Tiago Cunha's avatar
Tiago Cunha committed
34
                android:layout_height="wrap_content" />
Tiago Cunha's avatar
Tiago Cunha committed
35

Tiago Cunha's avatar
Tiago Cunha committed
36
        <chat.rocket.android.widget.RocketChatAvatar
Yusuke Iwaki's avatar
Yusuke Iwaki committed
37
                android:id="@+id/current_user_avatar"
Tiago Cunha's avatar
Tiago Cunha committed
38 39
                android:layout_width="40dp"
                android:layout_height="40dp" />
40 41

        <TextView
Yusuke Iwaki's avatar
Yusuke Iwaki committed
42 43 44 45 46 47 48 49
                android:id="@+id/current_user_name"
                android:layout_width="0px"
                android:layout_height="wrap_content"
                android:layout_gravity="center_vertical"
                android:layout_marginLeft="@dimen/margin_8"
                android:layout_marginRight="@dimen/margin_8"
                android:layout_weight="1"
                android:textSize="14sp"
Tiago Cunha's avatar
Tiago Cunha committed
50
                tools:text="John Doe" />
Tiago Cunha's avatar
Tiago Cunha committed
51 52

        <chat.rocket.android.widget.DownUpToggleView
Yusuke Iwaki's avatar
Yusuke Iwaki committed
53 54
                android:id="@+id/toggle_user_action"
                android:layout_width="wrap_content"
Tiago Cunha's avatar
Tiago Cunha committed
55
                android:layout_height="wrap_content" />
56 57 58

    </LinearLayout>

59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
    <FrameLayout
            android:id="@+id/search_box"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingBottom="@dimen/margin_8"
            android:paddingTop="@dimen/margin_8"
            android:elevation="2dp"
            android:layout_below="@+id/user_info_container"
            android:background="?attr/colorPrimaryDark">

        <View
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:focusableInTouchMode="true"
                android:focusable="true" />

        <android.support.v7.widget.SearchView
                android:id="@+id/search"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:queryHint="@string/navigation_search_rooms"
                app:iconifiedByDefault="false" />
    </FrameLayout>

83 84
    <android.support.v7.widget.RecyclerView
            android:id="@+id/room_list_container"
Tiago Cunha's avatar
Tiago Cunha committed
85
            android:layout_width="match_parent"
86
            android:layout_height="match_parent"
87
            android:layout_below="@+id/search_box"
88 89
            android:layout_alignParentBottom="true"
            android:background="?attr/colorPrimary" />
Tiago Cunha's avatar
Tiago Cunha committed
90 91

    <android.support.v4.widget.NestedScrollView
Yusuke Iwaki's avatar
Yusuke Iwaki committed
92
            android:id="@+id/user_action_outer_container"
Tiago Cunha's avatar
Tiago Cunha committed
93
            android:layout_width="match_parent"
94
            android:layout_height="wrap_content"
Yusuke Iwaki's avatar
Yusuke Iwaki committed
95 96 97 98 99
            android:layout_alignParentBottom="true"
            android:layout_below="@+id/user_info_container"
            android:background="?attr/colorPrimaryDark"
            android:elevation="2dp"
            android:visibility="gone"
100
            tools:visibility="gone">
Yusuke Iwaki's avatar
Yusuke Iwaki committed
101 102 103 104

        <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
Tiago Cunha's avatar
Tiago Cunha committed
105
                android:orientation="vertical">
Tiago Cunha's avatar
Tiago Cunha committed
106 107

            <TextView
Yusuke Iwaki's avatar
Yusuke Iwaki committed
108 109 110 111 112 113
                    android:id="@+id/btn_status_online"
                    style="@style/sidebar_list_item"
                    android:layout_marginLeft="16dp"
                    android:drawableLeft="@drawable/userstatus_online"
                    android:drawablePadding="16dp"
                    android:text="@string/user_status_online"
Tiago Cunha's avatar
Tiago Cunha committed
114
                    android:textAppearance="?attr/textAppearanceListItemSmall" />
Tiago Cunha's avatar
Tiago Cunha committed
115 116

            <TextView
Yusuke Iwaki's avatar
Yusuke Iwaki committed
117 118 119 120 121 122
                    android:id="@+id/btn_status_away"
                    style="@style/sidebar_list_item"
                    android:layout_marginLeft="16dp"
                    android:drawableLeft="@drawable/userstatus_away"
                    android:drawablePadding="16dp"
                    android:text="@string/user_status_away"
Tiago Cunha's avatar
Tiago Cunha committed
123
                    android:textAppearance="?attr/textAppearanceListItemSmall" />
Tiago Cunha's avatar
Tiago Cunha committed
124 125

            <TextView
Yusuke Iwaki's avatar
Yusuke Iwaki committed
126 127 128 129 130 131
                    android:id="@+id/btn_status_busy"
                    style="@style/sidebar_list_item"
                    android:layout_marginLeft="16dp"
                    android:drawableLeft="@drawable/userstatus_busy"
                    android:drawablePadding="16dp"
                    android:text="@string/user_status_busy"
Tiago Cunha's avatar
Tiago Cunha committed
132
                    android:textAppearance="?attr/textAppearanceListItemSmall" />
Tiago Cunha's avatar
Tiago Cunha committed
133 134

            <TextView
Yusuke Iwaki's avatar
Yusuke Iwaki committed
135 136 137 138 139 140
                    android:id="@+id/btn_status_invisible"
                    style="@style/sidebar_list_item"
                    android:layout_marginLeft="16dp"
                    android:drawableLeft="@drawable/userstatus_offline"
                    android:drawablePadding="16dp"
                    android:text="@string/user_status_invisible"
Tiago Cunha's avatar
Tiago Cunha committed
141
                    android:textAppearance="?attr/textAppearanceListItemSmall" />
Tiago Cunha's avatar
Tiago Cunha committed
142 143

            <chat.rocket.android.widget.DividerView
Yusuke Iwaki's avatar
Yusuke Iwaki committed
144
                    android:layout_width="match_parent"
Tiago Cunha's avatar
Tiago Cunha committed
145
                    android:layout_height="wrap_content" />
Tiago Cunha's avatar
Tiago Cunha committed
146 147

            <LinearLayout
Yusuke Iwaki's avatar
Yusuke Iwaki committed
148 149
                    android:id="@+id/btn_logout"
                    style="@style/sidebar_list_item"
Tiago Cunha's avatar
Tiago Cunha committed
150
                    android:orientation="horizontal">
Tiago Cunha's avatar
Tiago Cunha committed
151 152

                <FrameLayout
Yusuke Iwaki's avatar
Yusuke Iwaki committed
153
                        android:layout_width="48dp"
Tiago Cunha's avatar
Tiago Cunha committed
154
                        android:layout_height="match_parent">
Tiago Cunha's avatar
Tiago Cunha committed
155

156
                    <io.github.yusukeiwaki.android.widget.FontAwesomeTextView
Yusuke Iwaki's avatar
Yusuke Iwaki committed
157 158 159 160 161
                            android:layout_width="16dp"
                            android:layout_height="16dp"
                            android:layout_gravity="center"
                            android:gravity="center"
                            android:text="@string/fa_sign_out"
Tiago Cunha's avatar
Tiago Cunha committed
162
                            android:textSize="14dp" />
Tiago Cunha's avatar
Tiago Cunha committed
163 164 165
                </FrameLayout>

                <TextView
Yusuke Iwaki's avatar
Yusuke Iwaki committed
166 167 168
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@string/fragment_sidebar_main_logout_title"
Tiago Cunha's avatar
Tiago Cunha committed
169
                        android:textAppearance="?attr/textAppearanceListItemSmall" />
Tiago Cunha's avatar
Tiago Cunha committed
170
            </LinearLayout>
171

Tiago Cunha's avatar
Tiago Cunha committed
172 173 174 175
            <chat.rocket.android.widget.DividerView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content" />

176 177 178
            <TextView
                    android:id="@+id/version_info"
                    android:layout_width="wrap_content"
Tiago Cunha's avatar
Tiago Cunha committed
179
                    android:layout_height="wrap_content"
180
                    android:layout_gravity="center_horizontal"
Tiago Cunha's avatar
Tiago Cunha committed
181 182 183
                    android:layout_margin="@dimen/margin_8"
                    android:textAppearance="@style/TextAppearance.AppCompat.Caption"
                    tools:text="Version: 1.0" />
Tiago Cunha's avatar
Tiago Cunha committed
184 185
        </LinearLayout>
    </android.support.v4.widget.NestedScrollView>
Tiago Cunha's avatar
Tiago Cunha committed
186
</RelativeLayout>