Commit 0accf923 authored by Grigory Fedorov's avatar Grigory Fedorov

ContactList fragment placed in layout statically (not created via...

ContactList fragment placed in layout statically (not created via FragmentManager from Activity code).
parent 6a26d12f
...@@ -175,9 +175,6 @@ public class ContactList extends ChatIntentActivity implements OnAccountChangedL ...@@ -175,9 +175,6 @@ public class ContactList extends ChatIntentActivity implements OnAccountChangedL
sendText = savedInstanceState.getString(SAVED_SEND_TEXT); sendText = savedInstanceState.getString(SAVED_SEND_TEXT);
action = savedInstanceState.getString(SAVED_ACTION); action = savedInstanceState.getString(SAVED_ACTION);
} else { } else {
getSupportFragmentManager().beginTransaction().add(R.id.container,
new ContactListFragment(), CONTACT_LIST_TAG).commit();
sendText = null; sendText = null;
action = getIntent().getAction(); action = getIntent().getAction();
} }
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
--> -->
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout" android:id="@+id/drawer_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
...@@ -40,24 +41,28 @@ ...@@ -40,24 +41,28 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="horizontal"> android:orientation="horizontal">
<FrameLayout <fragment
android:id="@+id/container" android:id="@+id/container"
android:name="com.xabber.android.ui.ContactListFragment"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:padding="8dp" /> tools:layout="@layout/contact_list_fragment"
/>
<FrameLayout <FrameLayout
android:id="@+id/chat_container" android:id="@+id/chat_container"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="2" android:layout_weight="2"
android:padding="8dp">
>
<android.support.v4.view.ViewPager <android.support.v4.view.ViewPager
android:id="@+id/pager" android:id="@+id/pager"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent"
/>
<LinearLayout <LinearLayout
android:id="@+id/chat_scroll_indicator" android:id="@+id/chat_scroll_indicator"
...@@ -80,6 +85,7 @@ ...@@ -80,6 +85,7 @@
android:name="com.xabber.android.ui.ContactListDrawerFragment" android:name="com.xabber.android.ui.ContactListDrawerFragment"
android:layout_width="304dp" android:layout_width="304dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="left|start" /> android:layout_gravity="left|start"
tools:layout="@layout/contact_list_drawer" />
</android.support.v4.widget.DrawerLayout> </android.support.v4.widget.DrawerLayout>
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
--> -->
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout" android:id="@+id/drawer_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
...@@ -36,10 +37,13 @@ ...@@ -36,10 +37,13 @@
app:titleTextAppearance="@style/ToolbarTitle" /> app:titleTextAppearance="@style/ToolbarTitle" />
<!-- Main layout --> <!-- Main layout -->
<RelativeLayout <fragment
android:id="@+id/container" android:id="@+id/container"
android:name="com.xabber.android.ui.ContactListFragment"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" /> android:layout_height="match_parent"
tools:layout="@layout/contact_list_fragment"
/>
</LinearLayout> </LinearLayout>
<!-- Nav drawer --> <!-- Nav drawer -->
...@@ -48,6 +52,7 @@ ...@@ -48,6 +52,7 @@
android:name="com.xabber.android.ui.ContactListDrawerFragment" android:name="com.xabber.android.ui.ContactListDrawerFragment"
android:layout_width="304dp" android:layout_width="304dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="left|start" /> android:layout_gravity="left|start"
tools:layout="@layout/contact_list_drawer" />
</android.support.v4.widget.DrawerLayout> </android.support.v4.widget.DrawerLayout>
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
along with this program. If not, see http://www.gnu.org/licenses/. along with this program. If not, see http://www.gnu.org/licenses/.
--> -->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:fab="http://schemas.android.com/apk/res-auto" xmlns:fab="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
...@@ -23,11 +23,11 @@ ...@@ -23,11 +23,11 @@
android:id="@android:id/list" android:id="@android:id/list"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:drawSelectorOnTop="true"
android:background="@color/grey_400" android:background="@color/grey_400"
android:divider="@null" android:divider="@null"
android:dividerHeight="0dp" android:dividerHeight="0dp"
/> android:drawSelectorOnTop="true"
tools:listitem="@layout/contact_list_item" />
<RelativeLayout <RelativeLayout
android:id="@+id/info" android:id="@+id/info"
...@@ -76,15 +76,15 @@ ...@@ -76,15 +76,15 @@
<ScrollView <ScrollView
android:id="@+id/account_action_buttons_container" android:id="@+id/account_action_buttons_container"
android:layout_alignParentRight="true" android:layout_width="wrap_content"
android:layout_alignParentEnd="true" android:layout_height="wrap_content"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layout_marginRight="18dp" android:layout_alignParentEnd="true"
android:layout_width="wrap_content" android:layout_alignParentRight="true"
android:layout_height="wrap_content" android:layout_marginRight="18dp"
> >
...@@ -103,29 +103,29 @@ ...@@ -103,29 +103,29 @@
android:id="@+id/fab_up" android:id="@+id/fab_up"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
fab:fab_type="mini"
fab:fab_colorNormal="@color/red_500"
fab:fab_colorPressed="@color/red_700"
fab:fab_colorRipple="@color/color_primary_light"
android:src="@drawable/ic_chat_white_24dp"
android:clickable="false"
android:layout_marginTop="34dp"
android:layout_marginBottom="12dp" android:layout_marginBottom="12dp"
android:layout_marginLeft="16dp" android:layout_marginLeft="16dp"
android:layout_marginRight="16dp" android:layout_marginRight="16dp"
android:layout_marginTop="34dp"
android:clickable="false"
android:src="@drawable/ic_chat_white_24dp"
fab:fab_colorNormal="@color/red_500"
fab:fab_colorPressed="@color/red_700"
fab:fab_colorRipple="@color/color_primary_light"
fab:fab_type="mini"
/> />
</FrameLayout> </FrameLayout>
<LinearLayout <LinearLayout
android:id="@+id/account_action_buttons"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" android:layout_height="wrap_content"
android:id="@+id/account_action_buttons"
android:layout_marginBottom="4dp" android:layout_marginBottom="4dp"
android:orientation="vertical"
> >
</LinearLayout> </LinearLayout>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment