本文整理匯總了Java中android.support.v4.view.PagerTabStrip.setDrawFullUnderline方法的典型用法代碼示例。如果您正苦於以下問題:Java PagerTabStrip.setDrawFullUnderline方法的具體用法?Java PagerTabStrip.setDrawFullUnderline怎麽用?Java PagerTabStrip.setDrawFullUnderline使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.support.v4.view.PagerTabStrip
的用法示例。
在下文中一共展示了PagerTabStrip.setDrawFullUnderline方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: init
import android.support.v4.view.PagerTabStrip; //導入方法依賴的package包/類
public void init(){
viewPager =(ViewPager) findViewById(R.id.viewpager);
tabStrip =(PagerTabStrip) findViewById(R.id.pagertab);
inflater =this.getLayoutInflater().from(this);
staff =inflater.inflate(R.layout.about_staff, null);
update =inflater.inflate(R.layout.about_update,null);
tabStrip.setTabIndicatorColor(Color.rgb(255, 255, 255)); //FF9C95 RGB 255, 156, 149
tabStrip.setDrawFullUnderline(true);
tabStrip.setTextColor(Color.WHITE);
tabStrip.setBackgroundColor(Color.rgb(154, 205, 50));
viewList .add(staff);
viewTitle .add("STAFF");
viewList .add(update);
viewTitle .add("檢查更新");
viewPager .setAdapter(new MyPagerAdapter(viewList, viewTitle));
}
示例2: onCreate
import android.support.v4.view.PagerTabStrip; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_tope);
// adding preference layout to settings menu
PreferenceManager.setDefaultValues(this, R.xml.pref_general, false);
cleanUp();
// Create the adapter that will return a fragment for each of the three
// primary sections of the app.
mSectionsPagerAdapter = new TopeSectionsPagerAdapter(this, getSupportFragmentManager());
// Set up the ViewPager with the sections adapter.
mViewPager = (ViewPager) findViewById(R.id.pager);
mViewPager.setAdapter(mSectionsPagerAdapter);
pagerTabStrip = (PagerTabStrip) findViewById(R.id.pager_title_strip);
pagerTabStrip.setDrawFullUnderline(true);
pagerTabStrip.setTabIndicatorColor(0x030303);
clientDataSource = TopeUtils.getClientDataSource(getApplicationContext());
actionDataSource = TopeUtils.getActionDataSource(getApplicationContext());
startStatusChecking();
}
示例3: UIupdater
import android.support.v4.view.PagerTabStrip; //導入方法依賴的package包/類
UIupdater(Context context)
{
this.context=context;
//獲取布局
LayoutInflater flater = LayoutInflater.from(context);
mview = flater.inflate(R.layout.mview, null);
pager = (ViewPager) mview.findViewById(R.id.viewpager);
tabStrip = (PagerTabStrip) mview.findViewById(R.id.tabstrip);
button=(Button)mview.findViewById(R.id.buttonSet);
//取消tab下麵的長橫線
tabStrip.setDrawFullUnderline(false);
//設置tab的背景色
//tabStrip.setBackgroundColor(Color.argb(255, 111, 40, 98));
tabStrip.setBackgroundColor(Color.argb(255, 26, 209, 255));
//設置當前tab頁簽的下劃線顏色
tabStrip.setTabIndicatorColor(Color.argb(255, 26, 209, 255));
tabStrip.setTextSpacing(80);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(context, addcity.class);
context.startActivity(intent);
((MyActivity)context).finish();
}
});
}
示例4: onCreate
import android.support.v4.view.PagerTabStrip; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
titlelist = new ArrayList<String>();
fraglist = new ArrayList<Fragment>();
urlFragment = new URLFragment();
cacheFragment = new CacheFragment();
settingFragment = new SettingFragment();
cachingFragment = new CachingFragment();
fraglist.add(cacheFragment);
fraglist.add(cachingFragment);
fraglist.add(urlFragment);
fraglist.add(settingFragment);
pager_tab = (PagerTabStrip)findViewById(R.id.pager_tab);
pager_tab.setTabIndicatorColor(getResources().getColor(R.color.colorAccent));
pager_tab.setDrawFullUnderline(false);
pager_tab.setBackgroundColor(getResources().getColor(R.color.colorPrimary));
pager_tab.setTextSpacing(50);
titlelist.add("已完成");
titlelist.add("未完成");
titlelist.add("播放");
titlelist.add("設置");
viewPager = (ViewPager)findViewById(R.id.my_viewpager);
verifyStoragePermissions(this);
}
示例5: init
import android.support.v4.view.PagerTabStrip; //導入方法依賴的package包/類
public void init() {
viewPager = (ViewPager) findViewById(R.id.viewpager);
tabStrip = (PagerTabStrip) findViewById(R.id.pagertab);
inflater = this.getLayoutInflater().from(this);
View intro0 = inflater.inflate(R.layout.intro_0, null);
View intro1 = inflater.inflate(R.layout.intro_1, null);
View intro2 = inflater.inflate(R.layout.intro_2, null);
View intro3 = inflater.inflate(R.layout.intro_3, null);
View intro4 = inflater.inflate(R.layout.intro_4, null);
tabStrip.setTabIndicatorColor(Color.rgb(255, 255, 255)); // FF9C95 RGB
// 255, 156,
// 149
tabStrip.setDrawFullUnderline(true);
tabStrip.setTextColor(Color.WHITE);
tabStrip.setBackgroundColor(Color.rgb(154, 205, 50));
viewList.add(intro0);
viewTitle.add("0");
viewList.add(intro1);
viewTitle.add("1");
viewList.add(intro2);
viewTitle.add("2");
viewList.add(intro3);
viewTitle.add("3");
viewList.add(intro4);
viewTitle.add("4");
viewPager.setAdapter(new MyPagerAdapter(viewList, viewTitle));
viewPager.setOnPageChangeListener(this);
}
示例6: setUpLayout
import android.support.v4.view.PagerTabStrip; //導入方法依賴的package包/類
private void setUpLayout(View layout) {
viewPager = (ViewPager) layout.findViewById(R.id.view_pager);
pagerStrip = (PagerTabStrip) layout.findViewById(R.id.pager_strip);
adapter = new SwipeTimelineFragmentPagerAdapter();
viewPager.setAdapter(adapter);
pagerStrip.setDrawFullUnderline(false);
pagerStrip.setTabIndicatorColor(getResources().getColor(R.color.twitt4droid_primary_color));
}
示例7: onCreate
import android.support.v4.view.PagerTabStrip; //導入方法依賴的package包/類
@Override
public void onCreate(Bundle state) {
super.onCreate(state);
if (state == null) {
checkForLaunch(getIntent());
}
setContentView(R.layout.library_content);
/* Dropbox API stuff */
AndroidAuthSession session = buildSession();
mApi = new DropboxAPI<AndroidAuthSession>(session);
/* if(mApi.getSession().isLinked()) {
updateUi(true);
} */
/* end Dropbox API stuff */
LibraryPagerAdapter pagerAdapter = new LibraryPagerAdapter(this, mLooper);
mPagerAdapter = pagerAdapter;
ViewPager pager = (ViewPager) findViewById(R.id.pager);
pager.setAdapter(pagerAdapter);
mViewPager = pager;
//apply some styles that can't be configured in XML
PagerTabStrip strip = (PagerTabStrip) findViewById(R.id.pager_title_strip);
strip.setDrawFullUnderline(false);
strip.setTabIndicatorColor(0xc51162);
pager.setOnPageChangeListener(pagerAdapter);
mActionControls = findViewById(R.id.bottom_bar_controls);
mTitle = (TextView) mActionControls.findViewById(R.id.title);
mArtist = (TextView) mActionControls.findViewById(R.id.artist);
mCover = (ImageView) mActionControls.findViewById(R.id.cover);
mRoundPlayAllButton = (ImageButton) findViewById(R.id.round_play_all_button);
mRoundPlayAllButton.setOnClickListener(this);
registerForContextMenu(mRoundPlayAllButton);
mPagerAdapter.loadTabOrder();
loadAlbumIntent(getIntent());
}
示例8: onCreate
import android.support.v4.view.PagerTabStrip; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// 設置應用單獨的地圖存儲目錄,在下載離線地圖或初始化地圖時設置
MapsInitializer.sdcardDir = PathConstants.getOfflineMapPath();
setContentView(R.layout.activity_offline_map);
//默認顯示標題
getSupportActionBar().setDisplayShowTitleEnabled(true);
//標題左邊返回箭頭
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayShowHomeEnabled(false);
getSupportActionBar().setTitle(R.string.offlineMap);
viewpager = (ViewPager) findViewById(R.id.viewpager);
pagertab = (PagerTabStrip) findViewById(R.id.pagertab);
pagertab.setTabIndicatorColor(getResources().getColor(R.color.blue14));
pagertab.setDrawFullUnderline(false);
pagertab.setBackgroundColor(getResources().getColor(R.color.green6));
pagertab.setTextSpacing(50);
LayoutInflater inf = LayoutInflater.from(activity);
View v1 = inf.inflate(R.layout.view_offline_all, null, false);
lvAll = (ListView) v1.findViewById(R.id.lvAll);
spProvince = (Spinner) v1.findViewById(R.id.spProvince);
views.add(v1);
View v2 = inf.inflate(R.layout.view_offline_down, null, false);
lvDowning = (ListView) v2.findViewById(R.id.lvDowning);
views.add(v2);
titles.add(getResources().getString(R.string.offlineAllCity));
titles.add(getResources().getString(R.string.offlineDownManager));
viewpager.setOffscreenPageLimit(2);
viewpager.setAdapter(new MyPagerAdapter());
mAllAdapter = new DownAdapter();
lvAll.setAdapter(mAllAdapter);
mManagerAdapter = new DownAdapter();
lvDowning.setAdapter(mManagerAdapter);
initMapManager();
}
示例9: onCreate
import android.support.v4.view.PagerTabStrip; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle arg0) {
// TODO Auto-generated method stub
super.onCreate(arg0);
setContentView(R.layout.activity_main);
//用於永遠顯示3個點
getOverflowMenu();
cr = getContentResolver();
Boolean isFirstIn = false;
SharedPreferences pref = getSharedPreferences(SETNAME, 0);
//取得相應的值,如果沒有該值,說明還未寫入,用true作為默認值
isFirstIn = pref.getBoolean("isFirstIn", true);
if (isFirstIn) {
pref.edit().putBoolean("isFirstIn", false).apply();
}
Thread netThread = new Thread() {
public void run() {
new NetUtil(MainActivity.this).update();
}
};
netThread.start();
//停止加載主線程,等待數據下載(可能要動畫)
try {
netThread.join();
} catch (InterruptedException e) {
e.printStackTrace();
}
PagerTabStrip pagerTabStrip = (PagerTabStrip) findViewById(R.id.pagertab);
pagerTabStrip.setTabIndicatorColor(getResources().getColor(R.color.gold));
pagerTabStrip.setDrawFullUnderline(true);
pagerTabStrip.setBackgroundColor(getResources().getColor(R.color.azure));
pagerTabStrip.setTextSpacing(50);
ViewPager mViewPager = (ViewPager) findViewById(R.id.viewpager);
fragmentList = new ArrayList<Fragment>();//ViewPager中顯示的數據
ArrayList<String> titleList = new ArrayList<String>();// 標題數據
//添加數據
fragmentList.add(new ViewPagerFragment0());
fragmentList.add(new ViewPagerFragment1());
fragmentList.add(new ViewPagerFragment2());
fragmentList.add(new ViewPagerFragment3());
viewPagerFragment2 = ((ViewPagerFragment2)fragmentList.get(2));
titleList = new ArrayList<String>();// 每個頁麵的Title數據
titleList.add(getResources().getString(R.string.page0_title));
titleList.add(getResources().getString(R.string.page1_title));
titleList.add(getResources().getString(R.string.page2_title));
titleList.add(getResources().getString(R.string.page3_title));
mViewPager.setAdapter(new MyPagerFragmentAdapter(
getSupportFragmentManager(), fragmentList, titleList));
mViewPager.setCurrentItem(2);
mViewPager.setOffscreenPageLimit(4);
}