Skip to content

Commit f4762f5

Browse files
author
JPonte
committed
Tabs in the preferences
1 parent 1196649 commit f4762f5

20 files changed

+492
-371
lines changed

app/src/main/java/com/waz/zclient/pages/main/conversationlist/ConversationListManagerFragment.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,7 @@ public void onDestroyView() {
260260
@Override
261261
public void onActivityResult(int requestCode, int resultCode, Intent data) {
262262
super.onActivityResult(requestCode, resultCode, data);
263-
Fragment fragment = getChildFragmentManager().findFragmentById(R.id.fl__left__camera);
264-
if (fragment != null) {
263+
for (Fragment fragment : getChildFragmentManager().getFragments()) {
265264
fragment.onActivityResult(requestCode, resultCode, data);
266265
}
267266
}

app/src/main/res/layout-h600dp/preferences_profile_layout.xml

Lines changed: 0 additions & 125 deletions
This file was deleted.

app/src/main/res/layout/activity_settings.xml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,28 @@
4444
android:theme="?actionBarTheme"
4545
app:popupTheme="?actionBarPopupTheme"
4646
app:titleMarginStart="@dimen/wire__padding__regular"
47-
/>
47+
>
48+
49+
<FrameLayout
50+
android:id="@+id/account_tabs_container"
51+
android:layout_width="@dimen/team_tabs_max_width"
52+
android:layout_height="@dimen/teams_tab_default_height"
53+
android:layout_marginEnd="@dimen/toolbar_home_icon_width"
54+
android:layout_gravity="center"
55+
>
56+
<com.waz.zclient.views.AccountTabsView
57+
android:id="@+id/account_tabs"
58+
android:layout_width="wrap_content"
59+
android:layout_height="match_parent"
60+
android:orientation="horizontal"
61+
android:layout_gravity="center"
62+
android:paddingStart="@dimen/wire__padding__12"
63+
android:paddingEnd="@dimen/wire__padding__12"
64+
android:layout_marginEnd="@dimen/wire__padding__regular"
65+
/>
66+
</FrameLayout>
67+
68+
</android.support.v7.widget.Toolbar>
4869

4970
<FrameLayout
5071
android:id="@+id/content"

app/src/main/res/layout/conv_list_item_loading.xml renamed to app/src/main/res/layout/conv_list_item_loading_large.xml

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,53 +21,39 @@
2121
<LinearLayout
2222
xmlns:android="http://schemas.android.com/apk/res/android"
2323
xmlns:app="http://schemas.android.com/apk/res-auto"
24-
android:id="@+id/conversation_row_container"
2524
android:orientation="horizontal"
2625
android:layout_width="match_parent"
2726
android:layout_height="@dimen/conversation_list__row__height">
2827

2928
<ImageView
30-
android:id="@+id/conversation_icon"
3129
android:layout_width="@dimen/conversation_list__avatar__size"
3230
android:layout_height="@dimen/conversation_list__avatar__size"
3331
android:layout_gravity="center"
3432
android:layout_marginEnd="@dimen/conversation_list__avatar__outer_margin"
3533
android:layout_marginStart="@dimen/conversation_list__avatar__outer_margin"
3634
app:srcCompat="@drawable/list_row_chathead_loading"/>
3735

38-
<LinearLayout
36+
<FrameLayout
3937
android:layout_width="0dp"
4038
android:layout_height="match_parent"
4139
android:layout_weight="1"
42-
android:orientation="vertical"
4340
>
4441

45-
<Space
46-
android:layout_width="match_parent"
47-
android:layout_height="0dp"
48-
android:layout_weight="1"/>
49-
5042
<View
51-
android:layout_marginTop="0.5dp"
52-
android:id="@+id/conversation_title"
5343
android:layout_width="match_parent"
54-
android:layout_height="12dp"
55-
android:layout_marginEnd="64dp"
44+
android:layout_height="@dimen/conversation_list__skeleton_title_height"
45+
android:layout_marginEnd="@dimen/conversation_list__skeleton_title_margin_end_large"
5646
android:background="@drawable/conv_row_title_loading"
47+
android:layout_gravity="center_vertical"
5748
/>
5849

59-
<Space
60-
android:layout_width="match_parent"
61-
android:layout_height="0dp"
62-
android:layout_weight="1"/>
63-
6450
<View
65-
android:id="@+id/conversation_separator"
6651
android:layout_width="match_parent"
67-
android:layout_height="0.5dp"
52+
android:layout_height="@dimen/conversation_list__separator_height"
6853
android:background="@color/white_8"
54+
android:layout_gravity="bottom"
6955
/>
7056

71-
</LinearLayout>
57+
</FrameLayout>
7258

7359
</LinearLayout>
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
4+
Wire
5+
Copyright (C) 2017 Wire Swiss GmbH
6+
7+
This program is free software: you can redistribute it and/or modify
8+
it under the terms of the GNU General Public License as published by
9+
the Free Software Foundation, either version 3 of the License, or
10+
(at your option) any later version.
11+
12+
This program is distributed in the hope that it will be useful,
13+
but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
GNU General Public License for more details.
16+
17+
You should have received a copy of the GNU General Public License
18+
along with this program. If not, see <http://www.gnu.org/licenses/>.
19+
20+
-->
21+
<LinearLayout
22+
xmlns:android="http://schemas.android.com/apk/res/android"
23+
xmlns:app="http://schemas.android.com/apk/res-auto"
24+
android:orientation="horizontal"
25+
android:layout_width="match_parent"
26+
android:layout_height="@dimen/conversation_list__row__height">
27+
28+
<ImageView
29+
android:layout_width="@dimen/conversation_list__avatar__size"
30+
android:layout_height="@dimen/conversation_list__avatar__size"
31+
android:layout_gravity="center"
32+
android:layout_marginEnd="@dimen/conversation_list__avatar__outer_margin"
33+
android:layout_marginStart="@dimen/conversation_list__avatar__outer_margin"
34+
app:srcCompat="@drawable/list_row_chathead_loading"/>
35+
36+
<FrameLayout
37+
android:layout_width="0dp"
38+
android:layout_height="match_parent"
39+
android:layout_weight="1"
40+
>
41+
42+
<View
43+
android:layout_width="match_parent"
44+
android:layout_height="@dimen/conversation_list__skeleton_title_height"
45+
android:layout_marginEnd="@dimen/conversation_list__skeleton_title_margin_end_regular"
46+
android:background="@drawable/conv_row_title_loading"
47+
android:layout_gravity="center_vertical"
48+
/>
49+
50+
<View
51+
android:layout_width="match_parent"
52+
android:layout_height="@dimen/conversation_list__separator_height"
53+
android:background="@color/white_8"
54+
android:layout_gravity="bottom"
55+
/>
56+
57+
</FrameLayout>
58+
59+
</LinearLayout>
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
4+
Wire
5+
Copyright (C) 2017 Wire Swiss GmbH
6+
7+
This program is free software: you can redistribute it and/or modify
8+
it under the terms of the GNU General Public License as published by
9+
the Free Software Foundation, either version 3 of the License, or
10+
(at your option) any later version.
11+
12+
This program is distributed in the hope that it will be useful,
13+
but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
GNU General Public License for more details.
16+
17+
You should have received a copy of the GNU General Public License
18+
along with this program. If not, see <http://www.gnu.org/licenses/>.
19+
20+
-->
21+
<LinearLayout
22+
xmlns:android="http://schemas.android.com/apk/res/android"
23+
xmlns:app="http://schemas.android.com/apk/res-auto"
24+
android:orientation="horizontal"
25+
android:layout_width="match_parent"
26+
android:layout_height="@dimen/conversation_list__row__height">
27+
28+
<ImageView
29+
android:layout_width="@dimen/conversation_list__avatar__size"
30+
android:layout_height="@dimen/conversation_list__avatar__size"
31+
android:layout_gravity="center"
32+
android:layout_marginEnd="@dimen/conversation_list__avatar__outer_margin"
33+
android:layout_marginStart="@dimen/conversation_list__avatar__outer_margin"
34+
app:srcCompat="@drawable/list_row_chathead_loading"/>
35+
36+
<FrameLayout
37+
android:layout_width="0dp"
38+
android:layout_height="match_parent"
39+
android:layout_weight="1"
40+
>
41+
42+
<View
43+
android:layout_width="match_parent"
44+
android:layout_height="@dimen/conversation_list__skeleton_title_height"
45+
android:layout_marginEnd="@dimen/conversation_list__skeleton_title_margin_end_small"
46+
android:background="@drawable/conv_row_title_loading"
47+
android:layout_gravity="center_vertical"
48+
/>
49+
50+
<View
51+
android:layout_width="match_parent"
52+
android:layout_height="@dimen/conversation_list__separator_height"
53+
android:background="@color/white_8"
54+
android:layout_gravity="bottom"
55+
/>
56+
57+
</FrameLayout>
58+
59+
</LinearLayout>

app/src/main/res/layout/fragment_conversation_list.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,16 @@
7474
android:layout_width="match_parent"
7575
android:layout_height="match_parent"
7676
android:orientation="vertical"
77+
android:visibility="invisible"
7778
>
7879

79-
<include layout="@layout/conv_list_item_loading" />
80-
<include layout="@layout/conv_list_item_loading" />
81-
<include layout="@layout/conv_list_item_loading" />
82-
<include layout="@layout/conv_list_item_loading" />
83-
<include layout="@layout/conv_list_item_loading" />
84-
<include layout="@layout/conv_list_item_loading" />
85-
<include layout="@layout/conv_list_item_loading" />
80+
<include layout="@layout/conv_list_item_loading_small" />
81+
<include layout="@layout/conv_list_item_loading_regular" />
82+
<include layout="@layout/conv_list_item_loading_large" />
83+
<include layout="@layout/conv_list_item_loading_small" />
84+
<include layout="@layout/conv_list_item_loading_large" />
85+
<include layout="@layout/conv_list_item_loading_regular" />
86+
<include layout="@layout/conv_list_item_loading_small" />
8687

8788
</LinearLayout>
8889

@@ -99,7 +100,6 @@
99100
android:layout_height="match_parent"
100101
android:layout_marginBottom="@dimen/conversation_list__action_view__height"
101102
android:layout_marginTop="?attr/actionBarSize"
102-
android:visibility="invisible"
103103
/>
104104

105105
</FrameLayout>

0 commit comments

Comments
 (0)