MasterofProject

Android development in the use of a small padding skills

In Android application development, and sometimes to use the state button (when you can click on the background and can not be clicked), and the product requirements of the size of the button is fixed. The text on the button on the different mobile phone display may be some exceptions (mainly in the background to the button when it is very easy to appear), then how do we deal with it? We can use the padding attribute. Look at the small example: -------------------------- is a button, but background is used selector------- write XML file...
read(291) comment(1)

Android commonly used system Intent.Action small example

ACTION_MAIN android.intent.action.MAIN application entrance ACTION_VIEW android.intent.action.VIEW display data to the user Some of the data ACTION_ATTACH_DATA android.intent.action.ATTACH_DATA specifies additional information to other places ACTION_EDIT. Android...
read(291) comment(0)

Android data storage: network data interaction

Android commonly used in the development of the fifth data storage is commonly used in our GET, POST, HTTP and other protocols used to deal with the server. For example, the data file upload and download, web request, etc.. Almost all applications must be in contact with the network. Give an example of a very simple get request network: {try URL URL = URL new ("http://www.baidu.com"); Httpurlconnnection HttpURLConnection =...
read(109) comment(0)

Android data storage mode: ContentProvider

ContentProvider is one of the four major components of Android, showing its importance. When we use the ContentProvider, but also with other components such as Activity, in the AndroidManifest.xml register the corresponding components can be used. Why use ContentProvider as one of the data storage methods? The role of ContentProvider in Android is to share data (data sharing between applications), can be through Co...
read(199) comment(0)

Android data storage mode: database operation

Android application development certainly can not be separated from the data to deal with, there are a lot of open source framework available, more convenient than the original operation, such as AHibernate, GreenDao, OrmLite and so on. My current project is to use the GreenDao framework, you can use the Java project to generate our corresponding tool class in our Android project, we can directly use. After the detailed use of the future, I posted on the Android comes with the database operation class SQLiteOpenHelper use, due to the time of the relationship between the...
read(293) comment(0)

Android data storage: file storage

Android application most of the development of Java, so the java file operation in Android fully applicable, but Android on the phone, the more than an SD card storage settings. Simple ---------------------------------------------- interface layout ----------------------------------------------------------- Xmln...
read(272) comment(0)

Android data storage mode: SharePreference

Do not get away from the development of the data can not be sure, because programming = algorithm + data. Android application development to do the commonly used data storage methods have the following five: 1, using SharedPreferences to store data 2, file storage data 3, SQLite database storage data 4, using ContentProvider to store data 5, network storage data Today, a simple introduction to the first kind of storage: the use of SharedPreferences storage data. ...
read(181) comment(0)

Two types of broadcast registration in Android

BroadcastReceiver as one of the four major components of Android, the rate of high, especially a lot of data to be transmitted through the radio to get to the time, such as access to text messages, access to mobile phone power, etc.. There are usually two types of radio registration: 1) the type of radio, radio and registered in the Activity code, follow the life cycle of activity broadcasting. Before the end of the broadcast activity, the broadcast receiver should be removed. 2) resident registration, broadcast on And...
read(294) comment(0)

Android development in the JSON data analysis tools

Processing JSON data ---------------------------------------------------------------- ----------------------------------------------------- with Android comes with JSONArray and jsonobject In the following method the incoming path String is the URL address of the server where the data is located Public...
read(357) comment(2)

"APP development" APP specification example - detailed UI design method

From: http://www.yixieshi.com/it/20749.html On a APP development at the beginning of hand, the heart may have a lot of doubts: Screen design for wide width should not be set as a percentage; Button size and how to arrange, text font with much? What font to show the good-looking? Icon, how to use color? How the interface layout, a lot of problems, this article is dedicated to you. ...
read(114) comment(0)

Left and right sliding controls ViewPager small example

--------------------------------------------------Activity------------------------------------------------- Note: if the version is below 3 to import the android-support-v4.jar package, the title refers to the reference ViewPager Indicator more convenient oh! Next time you have time to share! CLA public...
read(194) comment(0)

Android commonly used five pop-up dialog box

A small example of Android development in common dialog box, a total of five kinds of dialog: ordinary pop-up dialog box, radio dialog box, multiple choice dialog, input dialog box and the progress bar style dialog box: Xmlns:tools= "http://schemas.android.com/tools" Android:layout_width= "match_parent" Android:layout_height= "match_paren...
read(387) comment(0)

Handler small example, the background color of the button to change the button

In the past few days has been busy in the development of a new project, write code written in pitch darkness, smoke today a few minutes to write a very simple example, another day will have the time to write! Layout file is very simple, on a Button: Xmlns:tools= "http://schemas.android.com/tools" Android:id= "@+id/LinearLayout1" Android:layout_width= "match_...
read(206) comment(0)

Android multi-threaded implementation file to download

Download_main_layout.xml: Xmlns:tools= "http://schemas.android.com/tools" Android:layout_width= "match_parent" Android:layout_height= "match_parent" Android:orientation= "vertical" >...
read(232) comment(0)

JSON data using Android

JSON (Object Notation JavaScript): a lightweight data interchange format, based on a subset of JavaScript. JSON adopts a completely independent text format, which makes JSON an ideal data exchange language. Easy to read and write, but also easy to machine analysis and generation (network transmission speed). As a data interchange format, JSON has obvious advantages (relative to our usual use of XML): JSON is smaller than XML; JSON and JavaScript interact more...
read(193) comment(0)
31 data a total of 3 pagesOne Two Three Next page Shadowe
    personal data
    • Visit47541 times
    • Integral:Two thousand two hundred and seventeen
    • Grade
    • Rank:10236th name
    • Original180
    • Reproduced:37
    • Translation:1
    • Comments:13
    最新评论