Improve search bar visibility

This commit is contained in:
Moxie Marlinspike
2017-11-13 12:44:51 -08:00
parent 9a75f49aa1
commit 405ee3b741
10 changed files with 251 additions and 60 deletions

View File

@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@id/container"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@id/container"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_alignParentTop="true"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:minHeight="?attr/actionBarSize"
@@ -18,10 +19,10 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:src="@drawable/icon_transparent"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
@@ -35,20 +36,36 @@
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/search_action"
android:layout_toStartOf="@+id/search_action"
android:layout_marginStart="66dp"
android:layout_marginLeft="66dp"/>
<ImageView android:id="@+id/search_action"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_search_white_24dp"
android:paddingRight="16dp"
android:paddingEnd="16dp"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"/>
</RelativeLayout>
</android.support.v7.widget.Toolbar>
<FrameLayout android:id="@+id/fragment_container"
android:layout_below="@id/toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<!--<fragment android:id="@+id/fragment"-->
<!--android:name="org.thoughtcrime.securesms.ConversationListFragment"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="match_parent"-->
<!--tools:layout="@layout/conversation_list_fragment"/>-->
<org.thoughtcrime.securesms.components.SearchToolbar
android:id="@+id/search_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:visibility="invisible"
tools:visibility="visible"/>
</LinearLayout>
</RelativeLayout>

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_height="wrap_content"
android:layout_width="match_parent"
tools:parentTag="android.widget.LinearLayout"
tools:orientation="vertical">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/search_toolbar_background"/>
<View android:layout_width="match_parent"
android:layout_height="7dp"
android:background="@drawable/search_toolbar_shadow"/>
</merge>