Archive for 'Android'

 

Android Notification

 

Incoming search terms:

  • android read text messages programmatically
  • how to read text messages on android programatically
  • ios receive sms programmatically
  • iphone programmatically read sms
  • read sms programmatically android example

When you make a Transition put extra data to Intent.

In the new activity you can retrieve this extra value

How to check if a service is running, Android?

what is the meaning of @id and @+id in Android?

If we use android:id=”@id/layout_item_id” it doesn’t work. Instead we have to use @+id/

Well, it depends on the context, when you’re using the XML attribute of android:id, then you’re specifying a new id, and are instructing the parser (or call it the builder) to create a new entry in R.java, thus you have to include a + sign.

While in the other case, like android:layout_below="@id/myTextView", you’re referring to an id that has already been created, so parser links this to the already created id in R.java

Incoming search terms:

  • @id in android

Android Play Music From Assets Folder

Incoming search terms:

  • android cocos2d play asset audio
  • load music from assets folder

How to limit Android EditText Length

It can be done in a couple of ways
Add this to the layout XML file : 

Or

Or in single line

Difference of px, dp, dip and sp in Android?

px is one pixel. scale-independent pixels ( sp ) and density-independent pixels ( dip ) you want to use sp for font sizes and dip for everything else.

px
Pixels – corresponds to actual pixels on the screen.

in
Inches – based on the physical size of the screen.

mm
Millimeters – based on the physical size of the screen.

pt
Points – 1/72 of an inch based on the physical size of the screen.

dp
Density-independent Pixels – an abstract unit that is based on the physical density of the screen. These units are relative to a 160 dpi screen, so one dp is one pixel on a 160 dpi screen. The ratio of dp-to-pixel will change with the screen density, but not necessarily in direct proportion. Note: The compiler accepts both “dip” and “dp”, though “dp” is more consistent with “sp”.

sp
Scale-independent Pixels – this is like the dp unit, but it is also scaled by the user’s font size preference. It is recommend you use this unit when specifying font sizes, so they will be adjusted for both the screen density and user’s preference.

 

For more info - http://developer.android.com/guide/topics/resources/more-resources.html#Dimension

Page 1 of 1312345...10...Last »