AndroidScreenSlide項目切換view動畫效果《IT藍豹》

AndroidScreenSlide項目切換view動畫效果

AndroidScreenSlide項目中有幾個不錯的效果,
一:Card Flip翻頁立體效果,二:Screen Slide 左右切換view時候和新加載view呈現效果,
三:Layout Changes添加每個item效果和刪除每個item效果。
四:Advanced Screen Slide切換viewpager時頁面切換動畫效果。
本項目來源:https://github.com/xiongwei-git/AndroidScreenSlide
主要代碼部分:
首頁展現:
public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);html

        // Instantiate the list of samples.
        mSamples = new Sample[]{
                new Sample(R.string.title_crossfade, CrossfadeActivity.class),
                new Sample(R.string.title_card_flip, CardFlipActivity.class),
                new Sample(R.string.title_screen_slide, ScreenSlideActivity.class),
                new Sample(R.string.title_zoom, ZoomActivity.class),
                new Sample(R.string.title_layout_changes, LayoutChangesActivity.class),
                new Sample(R.string.title_advanced_screen_slide, AdvancedScreenSlideActivity.class),
        };android

        setListAdapter(new ArrayAdapter<Sample>(this,
                android.R.layout.simple_list_item_1,
                android.R.id.text1,
                mSamples));
    }git

    @Override
    protected void onListItemClick(ListView listView, View view, int position, long id) {
        // Launch the sample associated with this list position.
        startActivity(new Intent(MainActivity.this, mSamples[position].activityClass));
    }github

 

運行效果:

效果代碼:http://www.itlanbao.com/code/20151022/10000/100589.html
ide

相關文章
相關標籤/搜索