diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/activities/TootActivity.java b/app/src/main/java/fr/gouv/etalab/mastodon/activities/TootActivity.java
index 1f4e858a2..e60ebd8f1 100644
--- a/app/src/main/java/fr/gouv/etalab/mastodon/activities/TootActivity.java
+++ b/app/src/main/java/fr/gouv/etalab/mastodon/activities/TootActivity.java
@@ -134,8 +134,7 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
private Button toot_it;
private AutoCompleteTextView toot_content;
private EditText toot_cw_content;
- private TextView toot_reply_content;
- private RelativeLayout toot_reply_content_container;
+ private LinearLayout toot_reply_content_container;
private BroadcastReceiver search_validate;
private Status tootReply = null;
private String sharedContent, sharedSubject;
@@ -209,8 +208,7 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
toot_picture_container = (LinearLayout) findViewById(R.id.toot_picture_container);
toot_content = (AutoCompleteTextView) findViewById(R.id.toot_content);
toot_cw_content = (EditText) findViewById(R.id.toot_cw_content);
- toot_reply_content = (TextView) findViewById(R.id.toot_reply_content);
- toot_reply_content_container = (RelativeLayout) findViewById(R.id.toot_reply_content_container);
+ toot_reply_content_container = (LinearLayout) findViewById(R.id.toot_reply_content_container);
picture_scrollview = (HorizontalScrollView) findViewById(R.id.picture_scrollview);
toot_sensitive = (CheckBox) findViewById(R.id.toot_sensitive);
//search_small_container = (LinearLayout) findViewById(R.id.search_small_container);
@@ -316,21 +314,6 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
boolean isAccountPrivate = account.isLocked();
- FloatingActionButton ic_close = (FloatingActionButton) findViewById(R.id.toot_close_reply);
-
- /*toot_close_accounts.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- manageShowUsers(searchAction.CLOSE, true);
- }
- });
-*/
- ic_close.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- toot_reply_content_container.setVisibility(View.GONE);
- }
- });
if(isAccountPrivate){
visibility = "private";
@@ -1078,20 +1061,38 @@ public class TootActivity extends AppCompatActivity implements OnRetrieveSearcAc
else
setTitle(R.string.toot_title_reply);
String userId = sharedpreferences.getString(Helper.PREF_KEY_ID, null);
- boolean show_reply = sharedpreferences.getBoolean(Helper.SET_SHOW_REPLY, false);
- if( show_reply ){
- toot_reply_content_container.setVisibility(View.VISIBLE);
- }else {
- toot_reply_content_container.setVisibility(View.GONE);
- }
- String content = tootReply.getContent();
- if(tootReply.getReblog() != null)
- content = tootReply.getReblog().getContent();
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
- toot_reply_content.setText(Html.fromHtml(content, Html.FROM_HTML_MODE_LEGACY));
- else
- //noinspection deprecation
- toot_reply_content.setText(Html.fromHtml(content));
+
+
+ FloatingActionButton ic_show = (FloatingActionButton) findViewById(R.id.toot_show_reply);
+
+ ic_show.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+
+
+ AlertDialog.Builder alert = new AlertDialog.Builder(TootActivity.this);
+ alert.setTitle(R.string.toot_reply_content_title);
+ final TextView input = new TextView(TootActivity.this);
+ //Set the padding
+ input.setPadding(30, 30, 30, 30);
+ alert.setView(input);
+ String content = tootReply.getContent();
+ if(tootReply.getReblog() != null)
+ content = tootReply.getReblog().getContent();
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
+ input.setText(Html.fromHtml(content, Html.FROM_HTML_MODE_LEGACY));
+ else
+ //noinspection deprecation
+ input.setText(Html.fromHtml(content));
+ alert.setPositiveButton(R.string.close, new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int whichButton) {
+ dialog.dismiss();
+ }
+ });
+ alert.show();
+ }
+ });
+ toot_reply_content_container.setVisibility(View.VISIBLE);
switch (tootReply.getVisibility()){
case "public":
visibility = "public";
diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/fragments/SettingsFragment.java b/app/src/main/java/fr/gouv/etalab/mastodon/fragments/SettingsFragment.java
index 0804bdc89..26810de9d 100644
--- a/app/src/main/java/fr/gouv/etalab/mastodon/fragments/SettingsFragment.java
+++ b/app/src/main/java/fr/gouv/etalab/mastodon/fragments/SettingsFragment.java
@@ -45,7 +45,6 @@ import android.widget.TextView;
import android.widget.Toast;
import fr.gouv.etalab.mastodon.activities.MainActivity;
-import fr.gouv.etalab.mastodon.activities.TootActivity;
import fr.gouv.etalab.mastodon.client.Entities.Account;
import fr.gouv.etalab.mastodon.helper.Helper;
import fr.gouv.etalab.mastodon.sqlite.AccountDAO;
@@ -56,8 +55,6 @@ import static android.app.Activity.RESULT_OK;
import static fr.gouv.etalab.mastodon.helper.Helper.CHANGE_THEME_INTENT;
import static fr.gouv.etalab.mastodon.helper.Helper.INTENT_ACTION;
import static fr.gouv.etalab.mastodon.helper.Helper.changeDrawableColor;
-import static fr.gouv.etalab.mastodon.helper.Helper.loadPPInActionBar;
-import static fr.gouv.etalab.mastodon.helper.Helper.updateHeaderAccountInfo;
/**
@@ -79,21 +76,9 @@ public class SettingsFragment extends Fragment {
final SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
- boolean show_reply = sharedpreferences.getBoolean(Helper.SET_SHOW_REPLY, false);
+
boolean auto_store = sharedpreferences.getBoolean(Helper.SET_AUTO_STORE, true);
- final CheckBox set_show_reply = (CheckBox) rootView.findViewById(R.id.set_show_reply);
- set_show_reply.setChecked(show_reply);
-
- set_show_reply.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- SharedPreferences.Editor editor = sharedpreferences.edit();
- editor.putBoolean(Helper.SET_SHOW_REPLY, set_show_reply.isChecked());
- editor.apply();
- }
- });
-
final CheckBox set_auto_store = (CheckBox) rootView.findViewById(R.id.set_auto_store);
set_auto_store.setChecked(auto_store);
set_auto_store.setOnClickListener(new View.OnClickListener() {
diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/helper/Helper.java b/app/src/main/java/fr/gouv/etalab/mastodon/helper/Helper.java
index a3d15e609..3f34dfcb2 100644
--- a/app/src/main/java/fr/gouv/etalab/mastodon/helper/Helper.java
+++ b/app/src/main/java/fr/gouv/etalab/mastodon/helper/Helper.java
@@ -199,7 +199,6 @@ public class Helper {
public static final String SET_WIFI_ONLY = "set_wifi_only";
public static final String SET_NOTIF_HOMETIMELINE = "set_notif_hometimeline";
public static final String SET_NOTIF_SILENT = "set_notif_silent";
- public static final String SET_SHOW_REPLY = "set_show_reply";
public static final String SET_SHOW_ERROR_MESSAGES = "set_show_error_messages";
public static final String SET_EMBEDDED_BROWSER = "set_embedded_browser";
public static final String SET_JAVASCRIPT = "set_javascript";
diff --git a/app/src/main/res/drawable-hdpi/ic_action_eye_open.png b/app/src/main/res/drawable-hdpi/ic_action_eye_open.png
new file mode 100644
index 000000000..5822f5f97
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_action_eye_open.png differ
diff --git a/app/src/main/res/drawable-ldpi/ic_action_eye_open.png b/app/src/main/res/drawable-ldpi/ic_action_eye_open.png
new file mode 100644
index 000000000..e441b7854
Binary files /dev/null and b/app/src/main/res/drawable-ldpi/ic_action_eye_open.png differ
diff --git a/app/src/main/res/drawable-mdpi/ic_action_eye_open.png b/app/src/main/res/drawable-mdpi/ic_action_eye_open.png
new file mode 100644
index 000000000..53a32c497
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_action_eye_open.png differ
diff --git a/app/src/main/res/drawable-xhdpi/ic_action_eye_open.png b/app/src/main/res/drawable-xhdpi/ic_action_eye_open.png
new file mode 100644
index 000000000..97dcfee5f
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_action_eye_open.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/ic_action_eye_open.png b/app/src/main/res/drawable-xxhdpi/ic_action_eye_open.png
new file mode 100644
index 000000000..333a69377
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_action_eye_open.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/ic_action_eye_open.png b/app/src/main/res/drawable-xxxhdpi/ic_action_eye_open.png
new file mode 100644
index 000000000..dc6087386
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_action_eye_open.png differ
diff --git a/app/src/main/res/layout-sw600dp/activity_toot.xml b/app/src/main/res/layout-sw600dp/activity_toot.xml
index d29c9a5b2..c80316f7f 100644
--- a/app/src/main/res/layout-sw600dp/activity_toot.xml
+++ b/app/src/main/res/layout-sw600dp/activity_toot.xml
@@ -40,41 +40,29 @@
android:hint="@string/toot_cw_placeholder"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
-
-
-
+ app:srcCompat="@drawable/ic_action_eye_open" />
+
-
-
-
-
+ app:srcCompat="@drawable/ic_action_eye_open" />
+
-
Aucun brouillon !
Choisissez un pouet
Supprimer le brouillon ?
+ Cliquer sur le boutton pour afficher le pouet d\'origine
Aucune description !
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 345349bf2..4bfe30937 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -174,6 +174,7 @@
No draft!
Choose a toot
Remove draft?
+ Click on the button to display the original toot
No description available!