Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Hi<br> The best solution for this is to add animation to layouts<br> suppose you have two tabs</p> <pre><code>tabs = (TabHost) this.findViewById(R.id.tabhost_id); tabs.setup(); tspec1 = tabs.newTabSpec(name_of_1st_tab) tspec1.setIndicator(....); tspec1.setContent(R.id.tab_1_layout_id); tab1Layout = (LinearLayout)findViewById(R.id.tab_1_layout_id); tspec2 = tabs.newTabSpec(name_of_2nd_tab) tspec2.setIndicator(....); tspec2.setContent(R.id.tab_1_layout_id); tab1Layout = (LinearLayout)findViewByIdR.id.tab_2_layout_id); </code></pre> <p>then on the TabChangedListener</p> <pre><code> tabs.setOnTabChangedListener(new OnTabChangeListener() { public void onTabChanged(String tabId) { tab1Layout.setAnimation(outToLeftAnimation()); tab2Layout.setAnimation(inFromRightAnimation()); } }); public Animation inFromRightAnimation() { Animation inFromRight = new TranslateAnimation( Animation.RELATIVE_TO_PARENT, +1.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f); inFromRight.setDuration(ConstandsUsed.ANIMATIION_DURATION); inFromRight.setInterpolator(new AccelerateInterpolator()); return inFromRight; } public Animation outToLeftAnimation() { Animation outtoLeft = new TranslateAnimation( Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, -1.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f); outtoLeft.setDuration(ConstandsUsed.ANIMATIION_DURATION); outtoLeft.setInterpolator(new AccelerateInterpolator()); return outtoLeft; } </code></pre> <p>Hope this will help you to get some idea</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload