mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
[android] Fix send button in ReportForm's action bar
This commit is contained in:
@@ -26,7 +26,7 @@ public class CrashFragment extends Fragment {
|
||||
.inflate(R.layout.fragment_crash, container, false);
|
||||
|
||||
v.findViewById(R.id.acceptButton).setOnClickListener(view ->
|
||||
getDevReportActivity().showReportForm(true));
|
||||
getDevReportActivity().displayFragment(true));
|
||||
v.findViewById(R.id.declineButton).setOnClickListener(view ->
|
||||
getDevReportActivity().closeReport());
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ public class DevReportActivity extends BaseCrashReportDialog {
|
||||
R.string.crash_report_title);
|
||||
requireNonNull(getDelegate().getSupportActionBar()).setTitle(title);
|
||||
|
||||
if (state == null) showReportForm(isFeedback());
|
||||
if (state == null) displayFragment(isFeedback());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -133,7 +133,7 @@ public class DevReportActivity extends BaseCrashReportDialog {
|
||||
return getException() instanceof UserFeedback;
|
||||
}
|
||||
|
||||
void showReportForm(boolean showReportForm) {
|
||||
void displayFragment(boolean showReportForm) {
|
||||
Fragment f;
|
||||
if (showReportForm) {
|
||||
File file =
|
||||
@@ -145,8 +145,15 @@ public class DevReportActivity extends BaseCrashReportDialog {
|
||||
requireNonNull(getDelegate().getSupportActionBar()).hide();
|
||||
}
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.replace(R.id.fragmentContainer, f)
|
||||
.replace(R.id.fragmentContainer, f, f.getTag())
|
||||
.commit();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invalidateOptionsMenu() {
|
||||
super.invalidateOptionsMenu();
|
||||
getDelegate().invalidateOptionsMenu();
|
||||
}
|
||||
|
||||
void closeReport() {
|
||||
|
||||
@@ -13,6 +13,7 @@ import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.CompoundButton.OnCheckedChangeListener;
|
||||
import android.widget.EditText;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
@@ -52,7 +53,7 @@ import static org.acra.ReportField.STACK_TRACE;
|
||||
@MethodsNotNullByDefault
|
||||
@ParametersNotNullByDefault
|
||||
public class ReportFormFragment extends Fragment
|
||||
implements CompoundButton.OnCheckedChangeListener {
|
||||
implements OnCheckedChangeListener {
|
||||
|
||||
private static final Logger LOG =
|
||||
getLogger(ReportFormFragment.class.getName());
|
||||
@@ -91,7 +92,7 @@ public class ReportFormFragment extends Fragment
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setHasOptionsMenu(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user