當前位置: 首頁>>代碼示例>>Java>>正文


Java CirclePageIndicator.setStrokeColor方法代碼示例

本文整理匯總了Java中com.viewpagerindicator.CirclePageIndicator.setStrokeColor方法的典型用法代碼示例。如果您正苦於以下問題:Java CirclePageIndicator.setStrokeColor方法的具體用法?Java CirclePageIndicator.setStrokeColor怎麽用?Java CirclePageIndicator.setStrokeColor使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.viewpagerindicator.CirclePageIndicator的用法示例。


在下文中一共展示了CirclePageIndicator.setStrokeColor方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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.instructions);

    mSectionsPagerAdapter = new SectionsPagerAdapter(getFragmentManager());

    mViewPager = (ViewPager) findViewById(R.id.pager);
    mViewPager.setAdapter(mSectionsPagerAdapter);

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

    final float density = getResources().getDisplayMetrics().density;
    mIndicator.setRadius(7 * density);
    mIndicator.setFillColor(0xFFFFFFFF);
    mIndicator.setPageColor(0xFF466066);
    mIndicator.setStrokeColor(0xFFFFFFFF);
    mIndicator.setStrokeWidth(2 * density);
    mIndicator.setSnap(false);
}
 
開發者ID:corcoran,項目名稱:Hangar,代碼行數:22,代碼來源:Instructions.java

示例4: onCreate

import com.viewpagerindicator.CirclePageIndicator; //導入方法依賴的package包/類
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

    setContentView(R.layout.activity_show_image);
    mPreviewImage = (ImageView) findViewById(R.id.preview_image);
    mProgressBar = (ProgressBar) findViewById(R.id.progress_bar_loading);
    mRootView = findViewById(R.id.root_view);
    Bundle bundle = getIntent().getExtras();
    mPictureOption = bundle.getParcelable("pictureOption");
    mImageUrls = mPictureOption.pictures;
    mCurrentIndex = mPictureOption.index;
    mViewPager = (ViewPager) findViewById(R.id.vp_single_viewpager);
    mCirclePageIndicator = (CirclePageIndicator) findViewById(R.id.vp_single_indicator);
    mCirclePageIndicator.setRadius(3 * getResources().getDisplayMetrics().density);
    mCirclePageIndicator.setPadding(4, 0, 4, 10);
    //未選中的填充色
    mCirclePageIndicator.setPageColor(0x33000000);
    //描邊
    mCirclePageIndicator.setStrokeWidth(2);
    mCirclePageIndicator.setStrokeColor(0x33FFFFFF);
    //填充色,選中狀態
    mCirclePageIndicator.setFillColor(0x7fFFFFFF);
    mAdapter = new SimplePagerAdapter(this);
    Picasso.with(this).load(mImageUrls.get(mCurrentIndex)).into(mPreviewImage, new Callback() {
        @Override
        public void onSuccess() {
            mAdapter.setData(mImageUrls);
            mViewPager.setAdapter(mAdapter);
            if (mImageUrls != null && mImageUrls.size() > 1) {
                mCirclePageIndicator.setViewPager(mViewPager);
            } else {
                mCirclePageIndicator.setVisibility(View.GONE);
            }
            mViewPager.setCurrentItem(mCurrentIndex);
        }

        @Override
        public void onError() {

        }
    });

}
 
開發者ID:captain-miao,項目名稱:DisplayImageAnimationTransition,代碼行數:46,代碼來源:ShowBigImageActivity.java

示例5: 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.setStrokeColor方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。