mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-15 08:29:24 +00:00
Scroll to link more options
This commit is contained in:
parent
178c1b0e99
commit
6c967f7e57
2 changed files with 14 additions and 0 deletions
|
@ -60,6 +60,7 @@ import android.widget.CheckBox;
|
|||
import android.widget.CompoundButton;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ScrollView;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
@ -83,6 +84,7 @@ import java.util.regex.Matcher;
|
|||
import java.util.regex.Pattern;
|
||||
|
||||
public class FragmentDialogOpenLink extends FragmentDialogBase {
|
||||
private ScrollView scroll;
|
||||
private ImageButton ibMore;
|
||||
private TextView tvMore;
|
||||
private Button btnOwner;
|
||||
|
@ -137,6 +139,7 @@ public class FragmentDialogOpenLink extends FragmentDialogBase {
|
|||
|
||||
// Get views
|
||||
final View dview = LayoutInflater.from(context).inflate(R.layout.dialog_open_link, null);
|
||||
scroll = dview.findViewById(R.id.scroll);
|
||||
final ImageButton ibInfo = dview.findViewById(R.id.ibInfo);
|
||||
final TextView tvTitle = dview.findViewById(R.id.tvTitle);
|
||||
final ImageButton ibDifferent = dview.findViewById(R.id.ibDifferent);
|
||||
|
@ -659,6 +662,16 @@ public class FragmentDialogOpenLink extends FragmentDialogBase {
|
|||
btnSettings.setVisibility(show ? View.VISIBLE : View.GONE);
|
||||
btnDefault.setVisibility(show && n ? View.VISIBLE : View.GONE);
|
||||
tvReset.setVisibility(show ? View.VISIBLE : View.GONE);
|
||||
if (show)
|
||||
scroll.post(new RunnableEx("link:scroll#1") {
|
||||
public void delegate() {
|
||||
scroll.getChildAt(0).post(new RunnableEx("link:scroll#2") {
|
||||
public void delegate() {
|
||||
scroll.scrollTo(0, scroll.getBottom());
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private Spanned format(Uri uri, Context context) {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<eu.faircode.email.ScrollViewEx xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/scroll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="24dp"
|
||||
|
|
Loading…
Add table
Reference in a new issue