Actionbarsherlock Demo 浅析 :Styled

Demo的目的:使用自定义的split bar 。

if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
            BitmapDrawable bg = (BitmapDrawable)getResources().getDrawable(R.drawable.bg_striped);
            bg.setTileModeXY(TileMode.REPEAT, TileMode.REPEAT);
            getSupportActionBar().setBackgroundDrawable(bg);

            BitmapDrawable bgSplit = (BitmapDrawable)getResources().getDrawable(R.drawable.bg_striped_split_img);
            bgSplit.setTileModeXY(TileMode.REPEAT, TileMode.REPEAT);
            getSupportActionBar().setSplitBackgroundDrawable(bgSplit);
        }

其实所谓的格式,就是操作相应的类相应的方法导入不同的资源,以后我会多尝试不同的style形式的。这个我自己对与Demo的理解就结束了。下面开始学习Actionbarsherlock与SlidingMenu相结合的漂亮的UI界面了。

posted @ 2015-08-06 15:24  黑泡man  阅读(139)  评论(0编辑  收藏  举报