Select chapter



basics (6.papers)
activities (5.papers)
services (2.papers)
threads (2.papers)
receivers (1.papers)
advanced android (2.papers)
SQLite database (1.papers)
adapters (1.papers)
adb and ddms (1.papers)
widgets (1.papers)
fragments (1.papers)
UI (1.papers)
Hide


  

android ui interview questions and answers

1
Define weigth sum and weights and where do we write them?
  1. Weight sum is used to provide the total weight to a layout containing a number of views.
    Weight property can be applied to a view and it tell the individulal weight of a particular view.
  2. weight property says how much portion of remaining space has to be taken by this view.
    weight sum says the total of all the layout view's weight.
    If weight sum is not provided to the layout, then it will be automatically calculated by summing the weight of child views in that layout.
    
    It is always a good practice to set weight sum to the parent layout when setting weight to the child views.
  3. weight property says how much portion of remaining space has to be taken by this view. weight sum says the total number of views sitting in that layout.
    If weight sum is not provided to the layout, then it will be automatically calculated by summing the weight of child views in that layout.
  4. weight property says how much portion of remaining space has to be taken by this view.
    weight sum says sum of its child view's weights.
    If weight sum is not provided to the layout, then it will be automatically calculated by summing the weight of child views in that layout.
    
    Use weight sum in the layout only if you are not going to add a new child view to your layout. It may create problem if you want to modify or add a new child view with a new weight to your existing layout. Then again you have to make sure that you modify the parent layout's weight sum as well. Else it will not work as desired.
Show Answer
Share Facebook gmail Twitter
2
How to fit a button view exactly in centre at extreme bottom in all mobiles irrespective of size?how to acheive it?
  1. Use a relative layout with a button with below properties. 
    
    android:layout_alignParentBottom="true"     android:layout_centerHorizontal="true"
  2. Use a relative layout with a button with below properties. 
    
    android:layout_alignParentBottom="true"     
    android:layout_gravity="center|horizontal"
  3. Use a linear layout with a button with below properties. 
    
    android:layout_alignParentBottom="true"     android:layout_centerHorizontal="true"
  4. None are correct
Show Answer
Share Facebook gmail Twitter
3
In listview,content in each textview should fit perfectly in all types of mobiles?how to attain it?
  1. Don't give hardcoded pixel or dp values to textview width. Use wrap_content for its width  and height.
  2. if textview has a background image, make sure various density versions of same image is available in different drawable folders. Make sure it is a nine-patch image so that it stretches properly.
  3. both option 1 and 2 are correct.
  4. None are correct
Show Answer
Share Facebook gmail Twitter
Read more papers :