Ice Cream Sandwich Tabs

Does anyone know about the stylebook / example style tabs for Ice Cream Sandwich(with left / right drawing - as in the application YouTube), which is not intended for a backward compatibility support library. You just need an API level of 14 or 15.

My project should work only Ice Cream Sandwichon mine Galaxy Nexus. Therefore, I would like to know how to do this without the need for backward compatibility.

Thanks Sam

+3
source share
2 answers

Well, there really is no reason to specifically avoid backward compatibility, because if you don't want older devices to use it, you can specify the minimum version of the API in the manifest for your application.

, ViewPager - , Google, Fragments, , , Android 4.

Fragments, View View, PagerAdapter FragmentPagerAdapter, ViewFlow.

ViewFlow v4, API 13+, , (, ).

+2

, ActionBar "tabs + swipe" API 14+. , .

- , :

  • / com.actionbarsherlock, !
  • android.support.v4 ( ), !

, , :

(MainActivity.java):

import com.actionbarsherlock.app.ActionBar.Tab;
import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.view.Menu;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.view.ViewPager;

public class MainActivity extends SherlockFragmentActivity implements ActionBar.TabListener {/*...*/} 
+1
source

All Articles