• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Get smooth tab Transition with viewpager.

Hey, is there a way to get a better visually looking transition method when changing tabs, than mine. I'am using the onChangeTab with viewPager.

Java:
private void onChangeTab(int position) {

       //TextView tab_home = findViewById(R.id.tab_home);

       if(position==0)
       {
           reset();
           TextView tv = findViewById(R.id.tab_home);
           tv.setLayoutParams(new TableLayout.LayoutParams(ViewPager.LayoutParams.WRAP_CONTENT, 40, 0.9f));
           home_.setTextSize(20);
           home_.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.tab_on));
           home_.setBackground(ContextCompat.getDrawable(getApplicationContext(), R.drawable.rounded_selected));
       }
       if(position==1)
       {
   ...



Is There a way to get a smooth transition.
 
Back
Top Bottom