Commit 60fa6221 authored by Grigory Fedorov's avatar Grigory Fedorov

Toolbar layouts: ?attr/actionBarSize used everwhere, small title size in landscape mode fixed.

parent 246afd2a
...@@ -117,7 +117,7 @@ public class ChatViewerFragment extends Fragment implements PopupMenu.OnMenuItem ...@@ -117,7 +117,7 @@ public class ChatViewerFragment extends Fragment implements PopupMenu.OnMenuItem
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
super.onCreateView(inflater, container, savedInstanceState); super.onCreateView(inflater, container, savedInstanceState);
View view = inflater.inflate(R.layout.chat_viewer_item, container, false); View view = inflater.inflate(R.layout.chat_fragment, container, false);
View contactTitle = view.findViewById(R.id.contact_title); View contactTitle = view.findViewById(R.id.contact_title);
......
...@@ -22,9 +22,8 @@ ...@@ -22,9 +22,8 @@
<android.support.v7.widget.Toolbar xmlns:app="http://schemas.android.com/apk/res-auto" <android.support.v7.widget.Toolbar xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/toolbar_default" android:id="@+id/toolbar_default"
android:layout_height="wrap_content" android:layout_height="?attr/actionBarSize"
android:layout_width="match_parent" android:layout_width="match_parent"
android:minHeight="52dp"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
...@@ -62,42 +61,42 @@ ...@@ -62,42 +61,42 @@
android:elevation="8dp" android:elevation="8dp"
> >
<ImageButton <ImageButton
android:id="@+id/button_security" android:id="@+id/button_security"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="8dp" android:padding="8dp"
android:src="@drawable/ic_security_grey_24dp" android:src="@drawable/ic_security_grey_24dp"
android:background="@null" android:background="@null"
android:contentDescription="@string/otr_encryption" android:contentDescription="@string/otr_encryption"
android:layout_gravity="bottom" android:layout_gravity="bottom"
/> />
<EditText <EditText
android:id="@+id/chat_input" android:id="@+id/chat_input"
android:inputType="textShortMessage|textAutoCorrect|textCapSentences|textMultiLine" android:layout_width="0dp"
android:cursorVisible="true" android:layout_height="wrap_content"
android:hint="@string/chat_input_hint" android:inputType="textShortMessage|textAutoCorrect|textCapSentences|textMultiLine"
android:layout_width="0dp" android:cursorVisible="true"
android:layout_height="wrap_content" android:hint="@string/chat_input_hint"
android:maxLines="4" android:maxLines="4"
android:scrollbars="vertical" android:scrollbars="vertical"
android:fadingEdge="vertical" android:fadingEdge="vertical"
android:layout_weight="1" android:layout_weight="1"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:background="@android:color/transparent" android:background="@android:color/transparent"
/> />
<ImageButton <ImageButton
android:id="@+id/button_send_message" android:id="@+id/button_send_message"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="8dp" android:padding="8dp"
android:src="@drawable/ic_button_send" android:src="@drawable/ic_button_send"
android:background="@null" android:background="@null"
android:contentDescription="@string/chat_send" android:contentDescription="@string/chat_send"
android:layout_gravity="bottom" android:layout_gravity="bottom"
/> />
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
android:id="@+id/toolbar_overlay" android:id="@+id/toolbar_overlay"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
app:titleTextAppearance="@style/ToolbarTitle"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
android:elevation="8dp" android:elevation="8dp"
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
<android.support.v7.widget.Toolbar xmlns:app="http://schemas.android.com/apk/res-auto" <android.support.v7.widget.Toolbar xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/toolbar_default" android:id="@+id/toolbar_default"
android:layout_height="wrap_content"
android:layout_width="match_parent" android:layout_width="match_parent"
android:minHeight="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
app:titleTextAppearance="@style/ToolbarTitle"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
android:background="?attr/colorPrimary" android:background="?attr/colorPrimary"
......
...@@ -23,4 +23,8 @@ ...@@ -23,4 +23,8 @@
<!-- for hardware button menu --> <!-- for hardware button menu -->
<item name="panelBackground">?attr/colorPrimary</item> <item name="panelBackground">?attr/colorPrimary</item>
</style> </style>
<style name="ToolbarTitle" parent="@style/TextAppearance.Widget.AppCompat.Toolbar.Title">
<item name="android:textSize">17sp</item>
</style>
</resources> </resources>
\ No newline at end of file
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