1. The first bug that our team believes should be improved: you should increase the return key that can exit the system
The main code is as follows:
PublicBoolean OnKeyDown (intKeyCode, KeyEventEvent) { //Press the Back button on the keyboard if(KeyCode = =keyevent.keycode_back) { NewAlertdialog.builder ( This). Setmessage ("are you sure you want to quit the game? "). Setnegativebutton ("Cancel", NewDialoginterface.onclicklistener () { Public voidOnClick (Dialoginterface dialog,intwhich) {}}). Setpositivebutton ("Determine", NewDialoginterface.onclicklistener () { Public voidOnClick (Dialoginterface dialog,intWhichbutton) {Finish (); }}). Show (); return true; } Else { returnSuper.onkeydown (KeyCode,Event); } }
2. The second bug that our team believes should be improved: The final Questionview should all be revealed, but only half the words "oh" can be seen in the original app:
We can use two methods: the first is to modify the size of the border XML: make it wider
The second type is to make the font smaller:
// Questiontextview.settextsize (ten);
3. The third bug that our team believes should be fixed: the correct answer to the wrong question should be displayed correctly or wrongly:
Here we add a TextView border to the XML and remember his ID and want to display this information:
<TextView Android:id="@+id/textview01"Android:layout_width="230DP"Android:layout_height="30DP"Android:layout_alignbottom="@+id/horiz"Android:layout_aligntop="@+id/horiz"Android:layout_torightof="@+id/button1"Android:background="@drawable/sz"android:gravity="Center"Android:text="Formula"Android:textcolor="#000000"android:textsize="18SP"/>
Then define it again in Playactivity.java:
view= (TextView) Findviewbyid (R.ID.TEXTVIEW01);
In the code, if you answer a question. Use SetText to achieve:
View.settext (" correct ");
This makes the effect
About the maths app to find bugs and fixes (see Team blog for details)