Fragments rotation bugs correction

New task layout for large screens (tablets)
Better task list layout
This commit is contained in:
bg45
2017-02-28 17:24:36 -05:00
parent e3c02c54d4
commit 558a0dad02
9 changed files with 135 additions and 34 deletions

View File

@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".activities.MainActivity">
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/appbar_padding_top"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:layout_scrollFlags="enterAlways"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|bottom"
android:layout_margin="@dimen/fab_margin"
android:onClick="onNewTaskClick"
android:src="@drawable/ic_add_white_24dp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="80dp"
android:orientation="horizontal">
<android.widget.ListView
android:id="@+id/tabs"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.2"/>
<com.wismna.geoffroy.donext.widgets.NonSwipeableViewPager
android:id="@+id/container"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.8"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</LinearLayout>
</android.support.design.widget.CoordinatorLayout>

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
android:orientation="horizontal">
<ImageView
android:id="@+id/handle"
android:layout_width="wrap_content"
@@ -19,8 +19,9 @@
android:textAppearance="?android:attr/textAppearanceMedium"/>
<EditText
android:id="@+id/task_list_name"
android:layout_width="175dp"
android:layout_width="0dp"
android:layout_height="?listPreferredItemHeight"
android:layout_weight="2"
android:inputType="text"
android:textAppearance="?android:attr/textAppearanceLarge"/>
<Button

View File

@@ -20,8 +20,9 @@
android:layout_marginStart="75dp">
<EditText
android:id="@+id/new_task_list_name"
android:layout_width="175dp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:hint="@string/task_list_new_list_hint"/>
<Button
android:id="@+id/new_task_list_button"