Comments (1)
Proposal:
don't create buttons yourself
don't even let crash report activity to create view
Utilize AlertDialog, which has button order set correctly by platform version.
Working code for the activity:
public class CrashShow extends Activity implements DialogInterface.OnClickListener{
private static class AlertDialogBase extends AlertDialog{
AlertDialogBase(Context c){
super(c);
setCanceledOnTouchOutside(false);
}
}
@Override
protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
AlertDialog dlg = new AlertDialogBase(this);
dlg.setTitle("Crash");
dlg.setMessage("Message");
dlg.setButton(DialogInterface.BUTTON_POSITIVE, getText(android.R.string.ok), CrashShow.this);
dlg.setButton(DialogInterface.BUTTON_NEGATIVE, getText(android.R.string.cancel), CrashShow.this);
dlg.show();
}
@Override
public void onClick(DialogInterface dialog, int which){
if(which==DialogInterface.BUTTON_POSITIVE)
sendCrash();
finish();
}
private void sendCrash(){
}
}
in manifest:
<activity
android:name="org.acra.CrashReportDialog"
android:theme="@android:style/Theme.Holo.Panel" >
</activity>
for API<11, replace theme by this:
android:theme="@android:style/Theme.NoDisplay"
actually, automatic resource selection system should be used to pick correct theme, if app has to run on both API <11 and >=11
this gives nice dialog on all platforms, and the code is short
from acra.
Related Issues (20)
- Notification - Not posted. PendingIntents attached to actions with remote inputs must be mutable HOT 1
- Notification does not launch intent HOT 2
- Mitigate duplicates in the ReportContent HOT 1
- Filter exceptions HOT 6
- MailSender does not open GMail (Android 14) HOT 3
- How can I find api for server? HOT 1
- No leading boundary when using POST withAttachmentUris HOT 6
- HTTP Multipart Report Filename HOT 3
- Mac Address in os 11 HOT 2
- ACRA incompatible with Cronet
- Custom Extensions and KSP support HOT 2
- ACRA initialization : getting ClassCastException on application update HOT 3
- HttpSender sends an empty body in ACRA 5.11.1 HOT 6
- AndroidStudio couldn't find the class 'MailSenderConfiguration or MailSenderConfigurationBuilder' HOT 3
- AndroidStudio couldn't find the class 'MailSenderConfiguration or MailSenderConfigurationBuilder' Again.
- ACRA SDK Error HOT 6
- Java 17 support HOT 2
- Possible to send Acra reports with own custom error dialog? HOT 3
- 403: Client error - request will be discarded HOT 7
- Custom ReportSender is called but send function is never reached HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from acra.