Added reformat info button

pull/178/head
M66B 4 years ago
parent 1f036f5216
commit fcd68a05f1

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

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