本文整理汇总了Java中com.viewpagerindicator.IconPageIndicator.setViewPager方法的典型用法代码示例。如果您正苦于以下问题:Java IconPageIndicator.setViewPager方法的具体用法?Java IconPageIndicator.setViewPager怎么用?Java IconPageIndicator.setViewPager使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.viewpagerindicator.IconPageIndicator
的用法示例。
在下文中一共展示了IconPageIndicator.setViewPager方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.viewpagerindicator.IconPageIndicator; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.simple_icons);
getSupportActionBar().setCustomView(R.layout.actionbar_icon_indicator);
getSupportActionBar().setDisplayShowCustomEnabled(true);
getSupportActionBar().setDisplayShowHomeEnabled(false);
getSupportActionBar().setDisplayHomeAsUpEnabled(false);
TestFragmentAdapter mAdapter = new TestFragmentAdapter(getSupportFragmentManager());
ViewPager mPager = (ViewPager)findViewById(R.id.pager);
mPager.setAdapter(mAdapter);
IconPageIndicator mIndicator = (IconPageIndicator) getSupportActionBar().getCustomView().findViewById(R.id.indicator);
mIndicator.setViewPager(mPager);
}
示例2: onCreate
import com.viewpagerindicator.IconPageIndicator; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.simple_icons);
mAdapter = new TestFragmentAdapter(getSupportFragmentManager());
mPager = (ViewPager)findViewById(R.id.pager);
mPager.setAdapter(mAdapter);
mIndicator = (IconPageIndicator)findViewById(R.id.indicator);
mIndicator.setViewPager(mPager);
}
示例3: onCreate
import com.viewpagerindicator.IconPageIndicator; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_icon_page_indicator);
ViewPager viewPager = (ViewPager) findViewById(R.id.viewpager);
viewPager.setAdapter(new IconPagerAdapterImpl(
getSupportFragmentManager()));
IconPageIndicator iconIndicator = (IconPageIndicator) findViewById(R.id.indicator);
iconIndicator.setViewPager(viewPager);
}
开发者ID:android-opensource-library-56,项目名称:android-opensource-library-56,代码行数:13,代码来源:IconPageIndicatorActivity.java
示例4: onCreate
import com.viewpagerindicator.IconPageIndicator; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
adhoc_actionbar = (View) findViewById(R.id.adhoc_actionbar);
mSearchView = (ImageButton) findViewById(R.id.mainmenu_search);
detector = new SimpleGestureFilter(this,this);
viewPager = (ViewPager) findViewById(R.id.home_pager);
mAdapter = new TabsPagerAdapter(getSupportFragmentManager());
viewPager.setAdapter(mAdapter);
mIndicator = (IconPageIndicator)findViewById(R.id.indicator);
mIndicator.setViewPager(viewPager);
helper=new Database_One(this);
Rhelper=new Database_Two(this);
utilhelper=new Util_Database(this);
UserID = utilhelper.getUSER_ID();
try {
copyBackGrounds();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
mSlideHolder = (SlideHolder) findViewById(R.id.slideHolder);
View toggleView = findViewById(R.id.main_option);
mainmenu_pimg = (NetworkImageView) findViewById(R.id.mainmenu_profimg);
mainmenu_pimg.setDefaultImageResId(R.drawable.me);
mainmenu_pname = (TextView) findViewById(R.id.mainmenu_profname);
toggleView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if(mSlideHolder.isOpened()) {
mSlideHolder.close();
} else {
SetMenuDetail();
mSlideHolder.open();
}
}
});
/*stopService(new Intent(this, IM_Monitor.class));
startService(new Intent(this, IM_Monitor.class));*/
}