Summary------Android software completed in 14 pm

Source: Internet
Author: User

In late July, he has been writing mobile security guards. Because my development ability is not very strong, resulting in the process of developing software, often look at two to three times the tutorial to complete a function, do not see the video tutorial can not write code.
In view of the urgency of the job search, but also in order to improve the programming ability more effectively, on July 30 began to write a new app-– word software. and completed on August 11.

Modules involved:
Functions involved:
• Search for words
• Delete a Thesaurus
• Reset your learning schedule
• Learn Words
• Review the words
• Test
• New Word Book

first, search for words:
1. Place a Autocompletetextview control that automatically matches the result from the thesaurus when the user enters 2 letters
2. The user clicks the word, enters the detail page, displays the word ID, the spelling, the explanation, the phonetic transcription and so on attributes. Can be added to the new word book

Idea: Use a map collection to store key value pairs of Word data < word spelling, thesaurus id>
Jump to the Word detail page and pass the Thesaurus ID and word spelling to the next activity
On the Details page, click "Add to New words" to launch the "Add word" feature. "Sdb.insert ()"

Second, delete the thesaurus:
Save the currently selected thesaurus to Sharedpreference, and click the Delete Thesaurus button to remove the data. and call Sdb.delete () to delete

Third, reset the learning Progress

Four, learn the word function:
The fragment is divided into two tabs, showing all the list and the list not learned,
Click on the ListView to go to the details page and click "Previous" and "next" to switch.

Given the ability to update the status of the list in real time, write the action to load the page into the OnStart () method
Not learned and have learned the list of the icon color is different

Five, review the word function:
The fragment is divided into two tabs, showing all the list and the list of the review,
In all lists, there are 3 states:
1. No Learning
2. No review required
3. It's time to review

Rules:
• Determine if the list needs to be reviewed
1. Determine whether the list has been learned, if not learned, there is no need to review
2. If the list has been studied, and if it is 0, the number of days between the current date and the study time is calculated. More than 1 days to review
3. If the list has been studied, and the number of review times 1-4 Times, the calculation of the current date and study time between the days, greater than (number of review times + 1) days, you need to review

• Different Click events for 3 states:
1. Pop-up dialog to jump to the learning page
2. Pop-up dialog, ask "current list does not need to review, whether review?" ”
3. Pop up the dialog and jump to the review page

Review the Word details page:
Ideas:
Button has 2 layers, first set the angle Mark i = 0, length = length of the Set

• When clicking on the top "I remember", the hidden button: "Remember Right" and "remember Wrong" will be displayed.
• I not equal to length
• Delete the current Word from the ArrayList collection if you click Remember right
• If the click is mistaken, let i++,
• I equals length
length is 0
Pop-up dialog and complete this review
length not for 0
Then set the i=0, starting from the No. 0 Word of the collection, until the set length is 0
• When clicking on the top "do not Remember", then the hidden button: "Next" will be displayed.
The idea is the same as the "remember wrong" button.

Six, test function:
The idea of the test Detail page:
Display a correct option and 3 random interpretations with a portrait radiogroup

Ideas:
1. Get the meanings of all the words and deposit them in the collection
2. Get the correct definition of the index
3. Randomly get 3 different numbers, each with a different number than the one you specify.
(1) randomlength = Length/3-1 set is the length of the random number [0-randomlength] take random number
(2) index = 0; the random number of each fetch is randomlength+1 [1-randomlength]
(3) index+= random number
(4) writes the process of acquiring a random number to a while (true), or break if the index and the specified number are different; otherwise, the operation to get the random number continues.

4. The interpretation of each number corresponds to 4 options.
5.collections.shuffle (ArrayList collection), you can disrupt the order of the elements in the collection
6. When the user clicks the Radiogroup, it is the correct answer, if it is, then rightword++;
7. When the test is finished, calculate the total number of rightword*100/words and calculate the accuracy rate.

Note: When Radiogroup calls Clearcheck (), it will also callback Oncheckchangedlistener ().
The listening method that is executed to determine whether the user clicked. Can be tagged with a Boolean type of flag

Recent days found that development efficiency is somewhat low, ready to write an improved efficiency of Android software. At the same time, but also to find a job, ~ ~ ~ work:):):)

Software source code: Http://pan.baidu.com/s/1ntmYaiX

Copyright notice: Just out of the original content of the pot, I hope you have help ~

Summary------Android software completed in 14 pm

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.