当前位置: 首页>>代码示例>>Java>>正文


Java CirclePageIndicator.setBackgroundColor方法代码示例

本文整理汇总了Java中com.viewpagerindicator.CirclePageIndicator.setBackgroundColor方法的典型用法代码示例。如果您正苦于以下问题:Java CirclePageIndicator.setBackgroundColor方法的具体用法?Java CirclePageIndicator.setBackgroundColor怎么用?Java CirclePageIndicator.setBackgroundColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.viewpagerindicator.CirclePageIndicator的用法示例。


在下文中一共展示了CirclePageIndicator.setBackgroundColor方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreate

import com.viewpagerindicator.CirclePageIndicator; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.simple_circles_stroke);

    CircleAdapter mAdapter = new CircleAdapter(getSupportFragmentManager());

    mPager = (ViewPager)findViewById(R.id.pager);
    mPager.setAdapter(mAdapter);

    CirclePageIndicator indicator = (CirclePageIndicator)findViewById(R.id.indicator);
    mIndicator = indicator;
    indicator.setViewPager(mPager);

    final float density = getResources().getDisplayMetrics().density;
    indicator.setBackgroundColor(0xFFCCCCCC);
    indicator.setRadius(10 * density);
    indicator.setPageColor(0x880000FF);
    indicator.setFillColor(0xFF888888);
    indicator.setStrokeColor(0xFF000000);
    indicator.setStrokeWidth(2 * density);
}
 
开发者ID:xulailing,项目名称:android-open-project-demo-master,代码行数:23,代码来源:SampleCirclesStyledMethods.java

示例2: onCreate

import com.viewpagerindicator.CirclePageIndicator; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.simple_circles);

    mAdapter = new TestFragmentAdapter(getSupportFragmentManager());

    mPager = (ViewPager)findViewById(R.id.pager);
    mPager.setAdapter(mAdapter);

    CirclePageIndicator indicator = (CirclePageIndicator)findViewById(R.id.indicator);
    mIndicator = indicator;
    indicator.setViewPager(mPager);

    final float density = getResources().getDisplayMetrics().density;
    indicator.setBackgroundColor(0xFFCCCCCC);
    indicator.setRadius(10 * density);
    indicator.setPageColor(0x880000FF);
    indicator.setFillColor(0xFF888888);
    indicator.setStrokeColor(0xFF000000);
    indicator.setStrokeWidth(2 * density);
}
 
开发者ID:xulailing,项目名称:android-open-project-demo-master,代码行数:23,代码来源:SampleCirclesStyledMethods.java

示例3: onCreate

import com.viewpagerindicator.CirclePageIndicator; //导入方法依赖的package包/类
@Override
	protected void onCreate(Bundle savedInstanceState) {
		// super.onCreate(savedInstanceState);
		// setContentView(R.layout.activity_help);

		super.onCreate(savedInstanceState);
		
		/*
		 * Set the title for the page
		 */
		//requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
		
		setContentView(R.layout.activity_help);

		/*
		 * Set the custom title for this page
		 */
		//getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,
		//		R.layout.standard_window_title);		
		
//		TextView tv = (TextView)findViewById(R.id.windowTitleText);
//		tv.setText(getResources().getString(R.string.help));
		
		mAdapter = new TestFragmentAdapter(getSupportFragmentManager());
		mAdapter.setContent(this);

		mPager = (ViewPager) findViewById(R.id.pager);
		mPager.setAdapter(mAdapter);

		CirclePageIndicator indicator = (CirclePageIndicator) findViewById(R.id.indicator);
		mIndicator = indicator;
		indicator.setViewPager(mPager);

		final float density = getResources().getDisplayMetrics().density;
		indicator.setBackgroundColor(0xFFCCCCCC);
		indicator.setRadius(10 * density);
		indicator.setPageColor(0x880000FF);
		indicator.setFillColor(0xFF888888);
		indicator.setStrokeColor(0xFF000000);
		indicator.setStrokeWidth(2 * density);

		// Remove notification bar
		this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
				WindowManager.LayoutParams.FLAG_FULLSCREEN);
		
		// Look up the AdView as a resource and load a request.
		AdView adView = (AdView) this.findViewById(R.id.adViewSmart);
		adView.loadAd(new AdRequest());

		// Remove notification bar
		this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
				WindowManager.LayoutParams.FLAG_FULLSCREEN);

		/*
		 * 
		 * mAdapter = new TestFragmentAdapter(getSupportFragmentManager());
		 * 
		 * mPager = (ViewPager)findViewById(R.id.pager);
		 * mPager.setAdapter(mAdapter);
		 * 
		 * mIndicator = (CirclePageIndicator)findViewById(R.id.indicator);
		 * mIndicator.setViewPager(mPager);
		 */
	}
 
开发者ID:aivijay,项目名称:VisionExpandLite,代码行数:65,代码来源:HelpActivity.java


注:本文中的com.viewpagerindicator.CirclePageIndicator.setBackgroundColor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。