Some layout improvements and fixes

This commit is contained in:
2016-10-01 17:40:38 +02:00
parent a18ef1ac29
commit 34000e7b79
10 changed files with 118 additions and 43 deletions

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015 Haruki Hasegawa
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<color android:color="@color/bg_item_selected_state"/>
</item>
</layer-list>

View File

@ -1,52 +1,53 @@
<RelativeLayout 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:gravity="center"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:gravity="center">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
android:elevation="4dp"
tools:ignore="UnusedAttribute"/>
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:elevation="4dp"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
tools:ignore="UnusedAttribute"/>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_below="@id/toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_below="@id/toolbar"
android:background="@color/bg_item_selected_state"
android:baselineAligned="false"
android:divider="?android:attr/dividerHorizontal"
android:orientation="horizontal"
android:showDividers="middle"
tools:context=".MessageListActivity">
tools:context=".MainActivity">
<!--
This layout is a two-pane layout for the Messages
master/detail flow.
-->
<FrameLayout
android:id="@+id/item_list"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
tools:context=".MessageListActivity"
tools:layout="@android:layout/list_content"/>
android:id="@+id/item_list"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
tools:context=".MessageListActivity"
tools:layout="@layout/fragment_message_list"/>
<FrameLayout
android:id="@+id/message_detail_container"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3"/>
android:id="@+id/message_detail_container"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_margin="16dp"
android:layout_weight="2"
android:background="@color/contentBackground"
android:elevation="2dp"
tools:layout="@layout/fragment_message_detail"/>
</LinearLayout>
</RelativeLayout>

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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:layout_width="match_parent"
android:layout_height="match_parent">
@ -15,7 +16,8 @@
android:paddingBottom="88dp"
android:scrollbarStyle="outsideOverlay"
android:scrollbars="vertical"/>
android:scrollbars="vertical"
tools:listitem="@layout/message_row"/>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab_compose_message"

View File

@ -8,6 +8,7 @@
<color name="colorAccent">#607D8B</color>
<color name="colorPrimaryText">#212121</color>
<color name="colorSecondaryText">#727272</color>
<color name="contentBackground">#FFFFFF</color>
<color name="icons">#212121</color>
<color name="divider">#B6B6B6</color>
@ -49,6 +50,7 @@
<color name="bg_item_normal_state">#ffffffff</color>
<color name="bg_item_swiping_state">@color/colorPrimaryLight</color>
<color name="bg_item_swiping_active_state">@color/colorPrimary</color>
<color name="bg_item_selected_state">@color/colorPrimaryLight</color>
<color name="bg_swipe_item_neutral">@android:color/transparent</color>
<color name="bg_swipe_item_trash">#fff45f30</color>
<color name="bg_swipe_item_archive">#fff9930d</color>