Pages

Android Questions & Answers

Question:1 How to start anroid development?

1. Download Android Studio and Java JDK5 or later version
2. Download the latest SDK tools and platforms.
3. Create a Project(Application) with Android Studio.
4. Now Running Your Application.

Question:2 What main components of Android application?

1. Activities: They dictate the UI and handle the user interaction to the screen.
2. Services: They handle background processing associated with an application.
3. Broadcast Receivers: They handle communication between Android OS and applications.v
4. Content Providers: They handle data and database management stuff.

Question:3 Difference between px, sp, dip, dpi and pt in Android?
px is one pixel.
px is corresponds to actual pixels on the screen.
sp is scale-independent pixels.
SP is like the dp unit, but it is also scaled by the user's font size preference.
dip is Density-independent pixels.
dpi is Dots per inches.
pt is points.


Question:4 How to Close/hide the Android Soft Keyboard?
Hide the virtual keyboard using the InputMethodManager.

super.onCreate(savedInstanceState);
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
setContentView(R.layout.purchase);

Raj

Hello I am Dharmendra Kumar Mishra From Siwan Bihar. I am Android Application Developer and Blogger. I love to share my knowledge over Internet.

No comments: