pull/155/head
M66B 6 years ago
parent 2423b51994
commit 82a46f5555

@ -89,6 +89,7 @@ import static android.accounts.AccountManager.newChooseAccountIntent;
public class FragmentAccount extends FragmentBase { public class FragmentAccount extends FragmentBase {
private ViewGroup view; private ViewGroup view;
private ScrollView scroll;
private Spinner spProvider; private Spinner spProvider;
@ -164,6 +165,7 @@ public class FragmentAccount extends FragmentBase {
setHasOptionsMenu(true); setHasOptionsMenu(true);
view = (ViewGroup) inflater.inflate(R.layout.fragment_account, container, false); view = (ViewGroup) inflater.inflate(R.layout.fragment_account, container, false);
scroll = view.findViewById(R.id.scroll);
// Get controls // Get controls
spProvider = view.findViewById(R.id.spProvider); spProvider = view.findViewById(R.id.spProvider);
@ -377,7 +379,7 @@ public class FragmentAccount extends FragmentBase {
new Handler().post(new Runnable() { new Handler().post(new Runnable() {
@Override @Override
public void run() { public void run() {
((ScrollView) view).smoothScrollTo(0, btnAdvanced.getTop()); scroll.smoothScrollTo(0, btnAdvanced.getTop());
} }
}); });
} }
@ -691,7 +693,7 @@ public class FragmentAccount extends FragmentBase {
new Handler().post(new Runnable() { new Handler().post(new Runnable() {
@Override @Override
public void run() { public void run() {
((ScrollView) view).smoothScrollTo(0, btnSave.getBottom()); scroll.smoothScrollTo(0, btnSave.getBottom());
} }
}); });
} }
@ -709,7 +711,7 @@ public class FragmentAccount extends FragmentBase {
new Handler().post(new Runnable() { new Handler().post(new Runnable() {
@Override @Override
public void run() { public void run() {
((ScrollView) view).smoothScrollTo(0, tvError.getBottom()); scroll.smoothScrollTo(0, tvError.getBottom());
} }
}); });
} }
@ -1067,7 +1069,7 @@ public class FragmentAccount extends FragmentBase {
new Handler().post(new Runnable() { new Handler().post(new Runnable() {
@Override @Override
public void run() { public void run() {
((ScrollView) view).smoothScrollTo(0, tvError.getBottom()); scroll.smoothScrollTo(0, tvError.getBottom());
} }
}); });
} }

@ -72,6 +72,7 @@ import javax.mail.Transport;
public class FragmentIdentity extends FragmentBase { public class FragmentIdentity extends FragmentBase {
private ViewGroup view; private ViewGroup view;
private ScrollView scroll;
private EditText etName; private EditText etName;
private EditText etEmail; private EditText etEmail;
@ -142,6 +143,7 @@ public class FragmentIdentity extends FragmentBase {
setHasOptionsMenu(true); setHasOptionsMenu(true);
view = (ViewGroup) inflater.inflate(R.layout.fragment_identity, container, false); view = (ViewGroup) inflater.inflate(R.layout.fragment_identity, container, false);
scroll = view.findViewById(R.id.scroll);
// Get controls // Get controls
etName = view.findViewById(R.id.etName); etName = view.findViewById(R.id.etName);
@ -350,7 +352,7 @@ public class FragmentIdentity extends FragmentBase {
new Handler().post(new Runnable() { new Handler().post(new Runnable() {
@Override @Override
public void run() { public void run() {
((ScrollView) view).smoothScrollTo(0, btnAdvanced.getTop()); scroll.smoothScrollTo(0, btnAdvanced.getTop());
} }
}); });
} }
@ -735,7 +737,7 @@ public class FragmentIdentity extends FragmentBase {
new Handler().post(new Runnable() { new Handler().post(new Runnable() {
@Override @Override
public void run() { public void run() {
((ScrollView) view).smoothScrollTo(0, tvError.getBottom()); scroll.smoothScrollTo(0, tvError.getBottom());
} }
}); });
} }

@ -8,6 +8,7 @@
tools:context=".ActivitySetup"> tools:context=".ActivitySetup">
<ScrollView <ScrollView
android:id="@+id/scroll"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"

@ -7,6 +7,7 @@
tools:context=".ActivitySetup"> tools:context=".ActivitySetup">
<ScrollView <ScrollView
android:id="@+id/scroll"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"

Loading…
Cancel
Save