Added support button to error dialog

This commit is contained in:
M66B 2024-01-27 17:22:06 +01:00
parent bd64f70c88
commit a0aae47656
2 changed files with 27 additions and 0 deletions

View File

@ -42,6 +42,7 @@ public class ActivityError extends ActivityBase {
private Button btnPassword;
private ImageButton ibSetting;
private ImageButton ibInfo;
private Button btnSupport;
@Override
protected void onCreate(Bundle savedInstanceState) {
@ -57,6 +58,7 @@ public class ActivityError extends ActivityBase {
btnPassword = findViewById(R.id.btnPassword);
ibSetting = findViewById(R.id.ibSetting);
ibInfo = findViewById(R.id.ibInfo);
btnSupport = findViewById(R.id.btnSupport);
load();
}
@ -173,6 +175,13 @@ public class ActivityError extends ActivityBase {
}
});
btnSupport.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Helper.view(v.getContext(), Helper.getSupportUri(v.getContext(), "error"), false);
}
});
Bundle args = new Bundle();
args.putLong("account", account);

View File

@ -111,6 +111,24 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/btnPassword"
app:srcCompat="@drawable/twotone_info_24" />
<androidx.constraintlayout.widget.Barrier
android:id="@+id/barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="ibSetting,ibInfo" />
<Button
android:id="@+id/btnSupport"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:drawableEnd="@drawable/twotone_support_24"
android:drawablePadding="6dp"
android:text="@string/menu_faq"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/barrier" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
</androidx.constraintlayout.widget.ConstraintLayout>