Added reformat info button

This commit is contained in:
M66B 2020-04-20 10:05:15 +02:00
parent 1f036f5216
commit fcd68a05f1
2 changed files with 21 additions and 5 deletions

View File

@ -1262,15 +1262,23 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
LayoutInflater inflater = LayoutInflater.from(getContext());
View dview = inflater.inflate(R.layout.dialog_first, null);
Button btnInfo = dview.findViewById(R.id.btnInfo);
Button btnBatteryInfo = dview.findViewById(R.id.btnBatteryInfo);
Button btnReformatInfo = dview.findViewById(R.id.btnReformatInfo);
btnInfo.setOnClickListener(new View.OnClickListener() {
btnBatteryInfo.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Helper.viewFAQ(getContext(), 39);
}
});
btnReformatInfo.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Helper.viewFAQ(getContext(), 35);
}
});
return new AlertDialog.Builder(getContext())
.setView(dview)
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {

View File

@ -44,7 +44,7 @@
app:layout_constraintTop_toBottomOf="@id/tvSync" />
<Button
android:id="@+id/btnInfo"
android:id="@+id/btnBatteryInfo"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -56,11 +56,19 @@
android:id="@+id/tvReformat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/title_hint_reformat"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="?android:attr/textColorPrimary"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/btnInfo" />
app:layout_constraintTop_toBottomOf="@id/btnBatteryInfo" />
<Button
android:id="@+id/btnReformatInfo"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/title_info"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvReformat" />
</androidx.constraintlayout.widget.ConstraintLayout>
</eu.faircode.email.ScrollViewEx>