diff options
Diffstat (limited to 'app/src')
5 files changed, 50 insertions, 2 deletions
diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/activities/ShowAccountActivity.java b/app/src/main/java/fr/gouv/etalab/mastodon/activities/ShowAccountActivity.java index 1b5bc28ef..c4cce8565 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/activities/ShowAccountActivity.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/activities/ShowAccountActivity.java @@ -237,8 +237,12 @@ public class ShowAccountActivity extends BaseActivity implements OnPostActionInt final ImageButton account_menu = findViewById(R.id.account_menu); ImageButton action_more = findViewById(R.id.action_more); - if( theme == THEME_LIGHT) + ImageButton action_back = findViewById(R.id.action_back); + if(theme == THEME_LIGHT){ changeDrawableColor(getApplicationContext(),action_more,R.color.dark_icon); + changeDrawableColor(getApplicationContext(),account_menu,R.color.dark_icon); + changeDrawableColor(getApplicationContext(),action_back,R.color.dark_icon); + } account_menu.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { @@ -251,6 +255,12 @@ public class ShowAccountActivity extends BaseActivity implements OnPostActionInt showMenu(account_menu); } }); + action_back.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + finish(); + } + }); if( account != null){ ManageAccount(); } diff --git a/app/src/main/res/drawable-anydpi/ic_back.xml b/app/src/main/res/drawable-anydpi/ic_back.xml new file mode 100644 index 000000000..26abc5351 --- /dev/null +++ b/app/src/main/res/drawable-anydpi/ic_back.xml @@ -0,0 +1,9 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + <path + android:fillColor="#FFFFFFFF" + android:pathData="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/> +</vector> diff --git a/app/src/main/res/layout-sw600dp/activity_show_account.xml b/app/src/main/res/layout-sw600dp/activity_show_account.xml index f0936bd77..00bc3a1ae 100644 --- a/app/src/main/res/layout-sw600dp/activity_show_account.xml +++ b/app/src/main/res/layout-sw600dp/activity_show_account.xml @@ -92,6 +92,20 @@ android:layout_height="40dp" /> <ImageButton + android:id="@+id/action_back" + android:background="?attr/selectableItemBackgroundBorderless" + android:layout_alignParentTop="true" + android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" + android:src="@drawable/ic_back" + android:layout_marginRight="10dp" + android:layout_marginEnd="10dp" + android:layout_width="40dp" + android:layout_height="40dp" + android:layout_marginTop="5dp" + android:contentDescription="@string/go_back" /> + + <ImageButton android:id="@+id/account_menu" android:background="?attr/selectableItemBackgroundBorderless" android:layout_alignParentTop="true" diff --git a/app/src/main/res/layout/activity_show_account.xml b/app/src/main/res/layout/activity_show_account.xml index 6177ced9b..a298c7053 100644 --- a/app/src/main/res/layout/activity_show_account.xml +++ b/app/src/main/res/layout/activity_show_account.xml @@ -91,6 +91,20 @@ android:layout_height="wrap_content" /> <ImageButton + android:id="@+id/action_back" + android:background="?attr/selectableItemBackgroundBorderless" + android:layout_alignParentTop="true" + android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" + android:src="@drawable/ic_back" + android:layout_marginRight="10dp" + android:layout_marginEnd="10dp" + android:layout_width="40dp" + android:layout_height="40dp" + android:layout_marginTop="5dp" + android:contentDescription="@string/go_back" /> + + <ImageButton android:id="@+id/account_menu" android:background="?attr/selectableItemBackgroundBorderless" android:layout_alignParentTop="true" @@ -436,7 +450,7 @@ android:text="@string/disclaimer_full" android:layout_width="match_parent" android:layout_height="wrap_content" /> - </android.support.v7.widget.Toolbar> + </android.support.v7.widget.Toolbar> <android.support.design.widget.TabLayout android:id="@+id/account_tabLayout" android:layout_width="match_parent" diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 2c7513655..1d198ccad 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -718,6 +718,7 @@ <string name="no_scheduled_boosts_indications"><![CDATA[Open the menu of a toot and then choose <b>Schedule boost</b>.]]></string> <string name="art_menu">Art timeline</string> <string name="open_menu">Open menu</string> + <string name="go_back">Go back</string> <string name="app_logo">Logo of the application</string> <string name="profile_picture">Profile picture</string> <string name="profile_banner">Profile banner</string> |