About the maths app to find bugs and fixes (see Team blog for details)

Source: Internet
Author: User

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)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.