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