Merge branch 'working' into 'develop'

toot activity icon adjustments

See merge request tom79/mastalab!2127
This commit is contained in:
Thomas 2019-03-30 21:09:42 +00:00
commit 7471fe1de5
4 changed files with 158 additions and 127 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

View File

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?><!--
<!--
Copyright 2017 Thomas Schneider Copyright 2017 Thomas Schneider
This file is a part of Mastalab This file is a part of Mastalab
@ -16,173 +15,193 @@
see <http://www.gnu.org/licenses>. see <http://www.gnu.org/licenses>.
--> -->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:fillViewport="true"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:fillViewport="true">
<LinearLayout <LinearLayout
android:id="@+id/drawer_layout" android:id="@+id/drawer_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="@dimen/activity_vertical_margin" android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/fab_margin" android:paddingLeft="@dimen/fab_margin"
android:paddingTop="@dimen/fab_margin"
android:paddingRight="@dimen/fab_margin" android:paddingRight="@dimen/fab_margin"
android:orientation="vertical"> android:paddingBottom="@dimen/fab_margin">
<EditText <EditText
android:id="@+id/toot_cw_content" android:id="@+id/toot_cw_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
android:animateLayoutChanges="true" android:animateLayoutChanges="true"
android:visibility="gone"
android:hint="@string/toot_cw_placeholder" android:hint="@string/toot_cw_placeholder"
android:layout_width="match_parent" android:visibility="gone" />
android:layout_height="wrap_content" />
<fr.gouv.etalab.mastodon.helper.MastalabAutoCompleteTextView <fr.gouv.etalab.mastodon.helper.MastalabAutoCompleteTextView
android:layout_marginTop="10dp"
android:id="@+id/toot_content" android:id="@+id/toot_content"
android:gravity="top|start"
android:inputType="textMultiLine|textCapSentences"
android:hint="@string/toot_placeholder"
android:layout_width="match_parent" android:layout_width="match_parent"
android:minLines="4" android:layout_height="0dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:layout_weight="1" android:layout_weight="1"
android:layout_height="0dp" /> android:gravity="top|start"
android:hint="@string/toot_placeholder"
android:inputType="textMultiLine|textCapSentences"
android:minLines="4" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<RelativeLayout <RelativeLayout
android:visibility="gone"
android:id="@+id/progress_bar_container" android:id="@+id/progress_bar_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content">
<ProgressBar
style="@style/Base.Widget.AppCompat.ProgressBar.Horizontal"
android:indeterminate="false"
android:id="@+id/upload_progress"
android:layout_width="match_parent"
android:max="100"
android:progress="0"
android:layout_height="wrap_content" android:layout_height="wrap_content"
/> android:visibility="gone">
<ProgressBar
android:id="@+id/upload_progress"
style="@style/Base.Widget.AppCompat.ProgressBar.Horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:indeterminate="false"
android:max="100"
android:progress="0" />
<TextView <TextView
android:id="@+id/toolbar_text" android:id="@+id/toolbar_text"
android:layout_width="match_parent" android:layout_width="match_parent"
android:textColor="@color/dark_text" android:layout_height="wrap_content"
android:gravity="center"
android:textSize="12sp"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_height="wrap_content" /> android:gravity="center"
android:textColor="@color/dark_text"
android:textSize="12sp" />
</RelativeLayout> </RelativeLayout>
<HorizontalScrollView <HorizontalScrollView
android:id="@+id/picture_scrollview" android:id="@+id/picture_scrollview"
android:visibility="gone"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
> android:visibility="gone">
<LinearLayout <LinearLayout
android:padding="5dp"
android:id="@+id/toot_picture_container" android:id="@+id/toot_picture_container"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxHeight="100dp"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:gravity="center_vertical" android:gravity="center_vertical"
android:maxHeight="100dp"
android:orientation="horizontal" android:orientation="horizontal"
> android:padding="5dp"></LinearLayout>
</LinearLayout>
</HorizontalScrollView> </HorizontalScrollView>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:orientation="horizontal" android:layout_height="wrap_content"
android:layout_height="wrap_content"> android:orientation="horizontal">
<ImageButton <ImageButton
android:id="@+id/toot_picture" android:id="@+id/toot_picture"
android:layout_width="50dp" android:layout_width="40dp"
android:layout_height="50dp" android:layout_height="40dp"
android:scaleType="centerCrop" android:layout_gravity="center"
android:padding="5dp" android:layout_marginEnd="5dp"
style="@style/Base.Widget.AppCompat.Button.Colored" android:layout_marginRight="5dp"
android:background="@color/transparent" android:background="@color/transparent"
android:src="@drawable/ic_insert_photo" android:contentDescription="@string/toot_select_image"
android:contentDescription="@string/toot_select_image" /> android:gravity="center"
android:scaleType="centerCrop"
android:src="@drawable/ic_insert_photo" />
<ImageButton <ImageButton
android:id="@+id/poll_action" android:id="@+id/poll_action"
android:visibility="gone" android:layout_width="40dp"
android:layout_width="50dp" android:layout_height="40dp"
android:layout_height="50dp" android:layout_gravity="center"
android:padding="5dp"
android:scaleType="centerCrop"
style="@style/Base.Widget.AppCompat.Button.Colored"
android:background="@color/transparent"
android:src="@drawable/ic_view_list_poll"
android:contentDescription="@string/poll" />
<ImageButton
android:layout_marginLeft="5dp"
android:layout_marginStart="5dp" android:layout_marginStart="5dp"
android:id="@+id/toot_visibility" android:layout_marginLeft="5dp"
android:layout_width="50dp" android:layout_marginEnd="5dp"
android:layout_height="50dp" android:layout_marginRight="5dp"
android:scaleType="centerCrop"
android:padding="5dp"
style="@style/Base.Widget.AppCompat.Button.Colored"
android:background="@color/transparent" android:background="@color/transparent"
android:src="@drawable/ic_public" android:contentDescription="@string/poll"
android:contentDescription="@string/toot_visibility_tilte"/> android:scaleType="centerCrop"
android:src="@drawable/ic_view_list_poll"
android:visibility="gone"/>
<ImageButton
android:id="@+id/toot_visibility"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center"
android:layout_marginStart="5dp"
android:layout_marginLeft="5dp"
android:layout_marginEnd="5dp"
android:layout_marginRight="5dp"
android:background="@color/transparent"
android:contentDescription="@string/toot_visibility_tilte"
android:scaleType="centerCrop"
android:src="@drawable/ic_public" />
<Button <Button
android:id="@+id/toot_cw" android:id="@+id/toot_cw"
android:layout_marginLeft="5dp"
android:layout_marginStart="5dp"
android:padding="5dp"
android:text="@string/cw"
android:textSize="20sp"
android:adjustViewBounds="true"
android:layout_gravity="center"
style="@style/Widget.AppCompat.Button.Colored"
android:background="@color/transparent"
android:layout_width="50dp" android:layout_width="50dp"
android:layout_height="50dp" android:layout_height="40dp"
android:scaleType="centerCrop"/> android:layout_gravity="center"
android:layout_marginStart="5dp"
android:layout_marginLeft="5dp"
android:layout_marginEnd="5dp"
android:layout_marginRight="5dp"
android:adjustViewBounds="true"
android:background="@color/transparent"
android:scaleType="centerCrop"
android:text="@string/cw"
android:textSize="25sp" />
<ImageButton <ImageButton
android:id="@+id/toot_emoji" android:id="@+id/toot_emoji"
android:minHeight="0dp" android:layout_width="40dp"
android:layout_marginLeft="5dp" android:layout_height="40dp"
android:layout_marginStart="5dp"
android:minWidth="0dp"
android:layout_gravity="center" android:layout_gravity="center"
android:padding="5dp" android:layout_marginStart="5dp"
android:contentDescription="@string/emoji_picker" android:layout_marginLeft="5dp"
android:src="@drawable/ic_emoji_selector" android:layout_marginEnd="5dp"
style="@style/Widget.AppCompat.Button.Colored" android:layout_marginRight="5dp"
android:background="@color/transparent" android:background="@color/transparent"
android:layout_width="50dp" android:contentDescription="@string/emoji_picker"
android:layout_height="50dp" android:minWidth="0dp"
android:minHeight="0dp"
android:scaleType="centerCrop" android:scaleType="centerCrop"
/> android:src="@drawable/ic_insert_emoticon" />
<TextView <TextView
android:id="@+id/toot_space_left" android:id="@+id/toot_space_left"
android:layout_width="0dp" android:layout_width="0dp"
android:textColor="?colorAccent" android:layout_height="45dp"
android:layout_gravity="center"
android:layout_weight="1" android:layout_weight="1"
android:gravity="center" android:gravity="center"
android:layout_gravity="center" android:textColor="?colorAccent" />
android:layout_height="50dp" />
<Button <Button
android:id="@+id/toot_it" android:id="@+id/toot_it"
android:padding="5dp"
android:text="@string/toot_it"
android:layout_gravity="end"
android:gravity="center"
style="@style/Base.Widget.AppCompat.Button.Colored" style="@style/Base.Widget.AppCompat.Button.Colored"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" /> android:layout_height="50dp"
android:layout_gravity="center"
android:gravity="center"
android:text="@string/toot_it"
android:textSize="18sp" />
</LinearLayout> </LinearLayout>
<CheckBox <CheckBox
android:text="@string/toot_sensitive"
android:visibility="gone"
android:id="@+id/toot_sensitive" android:id="@+id/toot_sensitive"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="wrap_content"
android:text="@string/toot_sensitive"
android:visibility="gone" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>

View File

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?><!--
<!--
Copyright 2017 Thomas Schneider Copyright 2017 Thomas Schneider
This file is a part of Mastalab This file is a part of Mastalab
@ -16,36 +15,39 @@
see <http://www.gnu.org/licenses>. see <http://www.gnu.org/licenses>.
--> -->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:fillViewport="true"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent"
android:fillViewport="true">
<LinearLayout <LinearLayout
android:id="@+id/drawer_layout" android:id="@+id/drawer_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="20dp" android:orientation="vertical"
android:paddingBottom="20dp"
android:paddingLeft="@dimen/toot_padding" android:paddingLeft="@dimen/toot_padding"
android:paddingTop="@dimen/toot_padding"
android:paddingRight="@dimen/toot_padding" android:paddingRight="@dimen/toot_padding"
android:orientation="vertical"> android:paddingBottom="@dimen/toot_padding">
<EditText <EditText
android:id="@+id/toot_cw_content" android:id="@+id/toot_cw_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
android:animateLayoutChanges="true" android:animateLayoutChanges="true"
android:visibility="gone"
android:hint="@string/toot_cw_placeholder" android:hint="@string/toot_cw_placeholder"
android:layout_width="match_parent" android:visibility="gone" />
android:layout_height="wrap_content" />
<fr.gouv.etalab.mastodon.helper.MastalabAutoCompleteTextView <fr.gouv.etalab.mastodon.helper.MastalabAutoCompleteTextView
android:layout_marginTop="10dp"
android:id="@+id/toot_content" android:id="@+id/toot_content"
android:gravity="top|start"
android:inputType="textMultiLine|textCapSentences"
android:hint="@string/toot_placeholder"
android:layout_width="match_parent" android:layout_width="match_parent"
android:minLines="4" android:layout_height="0dp"
android:layout_marginTop="10dp"
android:layout_weight="1" android:layout_weight="1"
android:layout_height="0dp" /> android:gravity="top|start"
android:hint="@string/toot_placeholder"
android:inputType="textMultiLine|textCapSentences"
android:minLines="4" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -101,42 +103,51 @@
<ImageButton <ImageButton
android:id="@+id/toot_picture" android:id="@+id/toot_picture"
android:layout_width="40dp" android:layout_width="28dp"
android:layout_height="40dp" android:layout_height="28dp"
android:layout_gravity="center"
android:layout_marginRight="5dp"
android:layout_marginEnd="5dp"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:background="@color/transparent" android:background="@color/transparent"
android:contentDescription="@string/toot_select_image" android:contentDescription="@string/toot_select_image"
android:padding="5dp"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@drawable/ic_insert_photo" /> android:src="@drawable/ic_insert_photo" />
<ImageButton <ImageButton
android:id="@+id/poll_action" android:id="@+id/poll_action"
android:layout_width="40dp" android:layout_width="28dp"
android:layout_height="40dp" android:layout_height="28dp"
android:layout_gravity="center"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:background="@color/transparent" android:background="@color/transparent"
android:contentDescription="@string/poll" android:contentDescription="@string/poll"
android:padding="5dp"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@drawable/ic_view_list_poll" android:src="@drawable/ic_view_list_poll"
android:visibility="gone" /> android:visibility="gone" />
<ImageButton <ImageButton
android:id="@+id/toot_visibility" android:id="@+id/toot_visibility"
android:layout_width="40dp" android:layout_width="28dp"
android:layout_height="40dp" android:layout_height="28dp"
android:layout_gravity="center"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:background="@color/transparent" android:background="@color/transparent"
android:contentDescription="@string/toot_visibility_tilte" android:contentDescription="@string/toot_visibility_tilte"
android:padding="5dp"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@drawable/ic_public" /> android:src="@drawable/ic_public" />
<Button <Button
android:id="@+id/toot_cw" android:id="@+id/toot_cw"
android:layout_width="40dp" android:layout_width="40dp"
android:layout_height="40dp" android:layout_height="28dp"
android:layout_gravity="center"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:background="@color/transparent" android:background="@color/transparent"
android:text="@string/cw" android:text="@string/cw"
@ -144,17 +155,18 @@
<ImageButton <ImageButton
android:id="@+id/toot_emoji" android:id="@+id/toot_emoji"
android:layout_width="40dp" android:layout_width="28dp"
android:layout_height="40dp" android:layout_height="28dp"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:background="@color/transparent" android:background="@color/transparent"
android:contentDescription="@string/emoji_picker" android:contentDescription="@string/emoji_picker"
android:minWidth="0dp" android:minWidth="0dp"
android:minHeight="0dp" android:minHeight="0dp"
android:padding="5dp"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@drawable/ic_emoji_selector" /> android:src="@drawable/ic_insert_emoticon" />
<TextView <TextView
android:id="@+id/toot_space_left" android:id="@+id/toot_space_left"
@ -169,10 +181,10 @@
android:id="@+id/toot_it" android:id="@+id/toot_it"
style="@style/Widget.AppCompat.Button.Colored" style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="40dp" android:layout_height="45dp"
android:layout_gravity="end" android:layout_gravity="end"
android:gravity="center" android:gravity="center"
android:padding="5dp" android:padding="0dp"
android:text="@string/toot_it" /> android:text="@string/toot_it" />
</LinearLayout> </LinearLayout>

View File

@ -7,7 +7,7 @@
<dimen name="nav_header_height">170dp</dimen> <dimen name="nav_header_height">170dp</dimen>
<dimen name="fab_margin">5dp</dimen> <dimen name="fab_margin">5dp</dimen>
<dimen name="drawer_padding">2dp</dimen> <dimen name="drawer_padding">2dp</dimen>
<dimen name="toot_padding">20dp</dimen> <dimen name="toot_padding">10dp</dimen>
<bool name="isTablet">false</bool> <bool name="isTablet">false</bool>
<dimen name="layout_height_header">180dp</dimen> <dimen name="layout_height_header">180dp</dimen>
<dimen name="fab_margin_floating">16dp</dimen> <dimen name="fab_margin_floating">16dp</dimen>