mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-01 10:35:15 +01:00
Added style to answers
This commit is contained in:
@@ -58,13 +58,11 @@ import android.os.Looper;
|
||||
import android.provider.ContactsContract;
|
||||
import android.provider.MediaStore;
|
||||
import android.provider.OpenableColumns;
|
||||
import android.text.Editable;
|
||||
import android.text.Html;
|
||||
import android.text.SpannableString;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.Spanned;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.text.style.ImageSpan;
|
||||
import android.text.style.QuoteSpan;
|
||||
import android.util.DisplayMetrics;
|
||||
@@ -3430,61 +3428,6 @@ public class FragmentCompose extends FragmentBase {
|
||||
}
|
||||
}
|
||||
|
||||
public static class FragmentDialogLink extends FragmentDialogBase {
|
||||
private EditText etLink;
|
||||
|
||||
@Override
|
||||
public void onSaveInstanceState(@NonNull Bundle outState) {
|
||||
outState.putString("fair:link", etLink.getText().toString());
|
||||
super.onSaveInstanceState(outState);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
|
||||
Uri uri = getArguments().getParcelable("uri");
|
||||
|
||||
View view = LayoutInflater.from(getContext()).inflate(R.layout.dialog_insert_link, null);
|
||||
etLink = view.findViewById(R.id.etLink);
|
||||
final TextView tvInsecure = view.findViewById(R.id.tvInsecure);
|
||||
|
||||
etLink.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable editable) {
|
||||
Uri uri = Uri.parse(editable.toString());
|
||||
tvInsecure.setVisibility(!uri.isOpaque() &&
|
||||
"http".equals(uri.getScheme()) ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
});
|
||||
|
||||
if (savedInstanceState == null)
|
||||
etLink.setText(uri == null ? "https://" : uri.toString());
|
||||
else
|
||||
etLink.setText(savedInstanceState.getString("fair:link"));
|
||||
|
||||
return new AlertDialog.Builder(getContext())
|
||||
.setView(view)
|
||||
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
String link = etLink.getText().toString();
|
||||
getArguments().putString("link", link);
|
||||
sendResult(RESULT_OK);
|
||||
}
|
||||
})
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.create();
|
||||
}
|
||||
}
|
||||
|
||||
public static class FragmentDialogSend extends FragmentDialogBase {
|
||||
@NonNull
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user