MasterofProject

Android: setTag () View () and getTag () methods used

To obtain corresponding usually we are using findviewbyid () method to obtain the view control we want to use, but in addition to this kind of method, we can also view setTag Onbect view to add an extra data, and then getTag) (the view. SetTag () and getTag () methods commonly used in the treatment of multiple identical View, such as we have to add a few Button click on the event, we can use view.getId () to distinguish Button, also...
read(308) comment(0)

Gao Kuan in the onWindowFocusChanged method to get the phone screen

Development, we often have to get the phone screen high wide data. Usually we will write a method such as getScreen (); and then call the getScreen () method in the Oncreate () (). We may get to the result that the width is 0. This is why? The reason lies in: In the life cycle of activity, the oncreate, OnStart and onresume are not real screen visible (visible), real time visible point is in when onWindo...
read(412) comment(0)

Application link from Market Android

Development of the Android APP application will be uploaded to the application market, if you want to achieve directly into the Market Android to find their desired application, we should be how to operate it? There must be some way, but the premise is to know the name of your application or the name of the developer or keyword. Of course, if you know the name of the application, the application is the most accurate! Below are introduced under: 1, by the name of the package to find applications: Uri URI = Uri.parse ("market://...
read(372) comment(0)

Communication among Android components: EventBus

In the application of the time, the different components of the communication between the two: a page in the data has changed, it may be necessary to inform the corresponding changes in a page. Before I used the method of: 1, the radio, through the radio to inform the corresponding interface, 2, write callback interface, through the implementation of the callback interface to notify the change in the corresponding data, etc.. Later used the communication between the components of open source EventBus framework, can be said to be feeling super convenient, save time, code! In the use of EventBus, the process is generally as follows: 1, Download jar EventBus and guide...
read(112) comment(0)

Android Animation: Frame animation

Frame animation is a kind of Android animation, similar to the movie we see the same, the animation is composed of N Zhang pictures, in a time when the ground to show pictures to achieve animation. There are two ways to achieve Frame animation, a XML in the animation layout, the other is pure code to achieve. Look at the XML layout method of Frame animation:                         In the code to achieve the three sentence code: ...
read(254) comment(0)

2D drawing tools in the Android class (Canvas, Paint and Color) Introduction

Usually the Android application development must have pictures, looking for art design pictures, into the project can be, but in addition to the use of the existing picture, we can also in 2D drawing is in the view painting patterns or text. Which usually have to use the class Canvas (canvas), Paint (brush) and Color (used to set the brush color) class, of course, may also use other types, are based on the needs of their projects to be set. : Canvas canvas, used to directly draw on View such as rectangular, circular, text and bitmap graphics. ...
read(250) comment(0)

Android custom control series nine: from the source to see the Android touch event distribution mechanism

Please respect the original work, reproduced, please indicate the source: http://prog3.com/sbdm/blog/cyp331203/article/details/45071069, non permissible, do not for commercial use or profit. All rights reserved. Android a touch event, the Internet also has many articles in terms of the, here today want to use examples and source code combination way, may see more clearly. Before speaking examples and source code, or the first conclusion about...
read(107) comment(0)

Custom View simple small example

In the development process, although the Android system provides a lot of control for us to use, but still can not meet the needs of our human beings, we really feel greedy, huh, huh! This time, we may use the custom control, as well as the custom attribute, how should operate? Generally according to the following steps: 1, inherited View or other controls, onMeasure, override the constructor onDraw, onTouch and other functions. 2 custom attributes, you need to build in values...
read(384) comment(0)

Android layout in the android:layout_gravity= bottom "LinearLayout" does not work

In the layout of the interface, we often use is LinearLayout, but sometimes it is not easy, for example, we in the page to put a button at the bottom of the screen at this time we set Android: layout Android:layout_gravity= "bottom" is no effect. Why? about LinearLayout: When android:orientation= "vertical", only in the horizontal direction is set to take effect, the vertical direction is not set...
read(405) comment(0)

LocationManager to obtain geographic latitude and longitude

Http://schemas.android.com/tools "xmlns:tools=" Android:layout_width= "match_parent" Android:layout_height= "match_parent" Android:paddingBottom= "@dimen/activity_vertical_margin" Andr...
read(314) comment(0)

Android Animation: tween animation (Tween animation)

Tween Android animation to achieve the principle: through the View content of the graphics transformation (translation, scaling, rotation, transparency) to achieve animation effects. The definition of animation effects can be used to do the XML can also be used to do encoding, today simply talk about the use of code to achieve Tween animation in the four animation. Four kinds of animation on the four animation classes: Gradient transparency animation AlphaAnimation Zoom animation effects Scale...
read(238) comment(0)

Using AsyncTask to load the application information that has been installed in the phone

Recently in the project in a small number of features is with the listview show the application of the phone has been installed, on the Internet for a demo (thanks to demo the sharer) and according to their own needs changed a bit, to change after code posted, leave a note: - the first is the application of the information Bean------------------------ Class AppInfo implements Serializable public { Priv...
read(337) comment(0)

Android start a only know the name of the application

We know that to start an application, you need to know the name of the application to start the Activity, but start the ACTION Activity parameters, so you can start by startActivity (Intent), such as: Application of activated / * * the package name is com.xx.xx, the application of com.xx.xx.TestLaunchActivity**/ entrance    Intent intent = new (Intent)...
read(354) comment(0)

Can choose the ListView list

Class TestActivity extends Activity public { The layout of the code written in View*/ / * * LinearLayout mParentLinearLayout private; The title / * * TextView*/ TextView mTitleTv private; To display data in ListView*/ / * * Private ListView mListView...
read(236) comment(0)

Android access to mobile phone numbers and operators

Class PhoneSIMCInfo public { Mobile phone management tool * / / * * TelephonyManager telephonyManager private; International mobile subscriber identification code * / / * * String mImsi private; PhoneSIMCInfo public (context Context) { TelephonyManager = (TelephonyMan =...
read(315) comment(0)
37 data a total of 3 pagesOne Two Three Next page Shadowe
    personal data
    • visit48124 times
    • Integral:Two thousand two hundred and twenty-three
    • Grade
    • Rank:10236th name
    • original180
    • Reproduced:37
    • Translation:1
    • Comments:13
    Latest comments