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


Java CircleIndicator类代码示例

本文整理汇总了Java中me.relex.circleindicator.CircleIndicator的典型用法代码示例。如果您正苦于以下问题:Java CircleIndicator类的具体用法?Java CircleIndicator怎么用?Java CircleIndicator使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: onViewCreated

import me.relex.circleindicator.CircleIndicator; //导入依赖的package包/类
@Override public void onViewCreated(final View view, @Nullable Bundle savedInstanceState) {
    ViewPager viewpager = (ViewPager) view.findViewById(R.id.viewpager);
    CircleIndicator indicator = (CircleIndicator) view.findViewById(R.id.indicator);
    viewpager.setAdapter(new SamplePagerAdapter());
    indicator.setViewPager(viewpager);

    mSnackbar = Snackbar.make(view.findViewById(R.id.coordinator_layout), "Snackbar",
            Snackbar.LENGTH_SHORT);

    view.findViewById(R.id.button).setOnClickListener(new View.OnClickListener() {
        @Override public void onClick(View v) {
            if (!mSnackbar.isShown()) {
                mSnackbar.show();
            } else {
                mSnackbar.dismiss();
            }
        }
    });
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:20,代码来源:SnackbarBehaviorFragment.java

示例2: onViewCreated

import me.relex.circleindicator.CircleIndicator; //导入依赖的package包/类
@Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {

        view.findViewById(R.id.add).setOnClickListener(this);
        view.findViewById(R.id.remove).setOnClickListener(this);

        mAdapter = new SamplePagerAdapter(1) {
            @Override public int getItemPosition(Object object) {
                return POSITION_NONE;
            }
        };

        ViewPager viewpager = (ViewPager) view.findViewById(R.id.viewpager);
        CircleIndicator indicator = (CircleIndicator) view.findViewById(R.id.indicator);
        viewpager.setAdapter(mAdapter);
        indicator.setViewPager(viewpager);
        mAdapter.registerDataSetObserver(indicator.getDataSetObserver());
    }
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:18,代码来源:DynamicAdapterFragment.java

示例3: onCreateView

import me.relex.circleindicator.CircleIndicator; //导入依赖的package包/类
/**
 * more info - https://stackoverflow.com/questions/19544829/viewpager-with-fragments-inside-popupwindow-or-dialogfragment-error-no-view/19552298#19552298
 * You have to use the getChildFragmentManager() -> otherwise this doesn't work!!!
 */
@Nullable
@Override
public View onCreateView(LayoutInflater inflater,
                         @Nullable ViewGroup container,
                         @Nullable Bundle savedInstanceState) {
  View view = inflater.inflate(R.layout.debug_details_viewpager, container, false);

  // get the position int from the bundle
  int position = getArguments().getInt("position", -1);

  // view pager setup
  ViewPager viewPager = (ViewPager) view.findViewById(R.id.debug_view_pager);
  //
  // Note the use of getChildFragmentManager() since this is a dialogfragment!!!
  // and not getFragmentManager()
  //
  ViewPagerAdapter myPagerAdapter =
    new ViewPagerAdapter(getChildFragmentManager(), position);
  viewPager.setAdapter(myPagerAdapter);
  CircleIndicator indicator = (CircleIndicator) view.findViewById(R.id.debug_indicator);
  indicator.setViewPager(viewPager);
  return view;
}
 
开发者ID:r3bl-alliance,项目名称:starterproject_todolist_react_redux_firebase_ts_md,代码行数:28,代码来源:DebugDetailsDialogFragment.java

示例4: getHeadView

import me.relex.circleindicator.CircleIndicator; //导入依赖的package包/类
/**
 * 实例化RecyclerView头部View
 */
public View getHeadView(final News news) {
    View bannerHome = LayoutInflater.from(context).inflate(R.layout.banner_home,null);
    bannerHome.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
            ViewGroup.LayoutParams.WRAP_CONTENT));
    loopPagerAdapter = new LoopPagerAdapter(context, news.getTop_stories());
    //初始化viewPager
    viewPager = (LoopViewPager) bannerHome.findViewById(R.id.Loop_ViewPager);
    viewPager.setAdapter(loopPagerAdapter);
    viewPager.setCurrentItem(0);

    //初始化CircleIndicator
    indicator = (CircleIndicator) bannerHome.findViewById(R.id.circle_indicator);
    indicator.setViewPager(viewPager);

    //为TextView设置Title
    bannerTitle = (TextView) bannerHome.findViewById(R.id.banner_title);
    bannerTitle.setText(String.valueOf(loopPagerAdapter.
            getPageTitle(viewPager.getCurrentItem())));

    return bannerHome;
}
 
开发者ID:walkthehorizon,项目名称:HeartRead,代码行数:25,代码来源:HomeRecmondFragment.java

示例5: onCreate

import me.relex.circleindicator.CircleIndicator; //导入依赖的package包/类
@Override protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_viewpager);

    ((Toolbar) findViewById(R.id.toolbar)).setNavigationOnClickListener(
            new View.OnClickListener() {
                @Override public void onClick(View v) {
                    onBackPressed();
                }
            });

    CircleIndicator indicator = (CircleIndicator) findViewById(R.id.indicator);
    MultiTouchViewPager viewPager = (MultiTouchViewPager) findViewById(R.id.view_pager);
    viewPager.setAdapter(new DraweePagerAdapter());
    indicator.setViewPager(viewPager);
}
 
开发者ID:cowthan,项目名称:AyoSunny,代码行数:17,代码来源:ViewPagerActivity.java

示例6: onCreate

import me.relex.circleindicator.CircleIndicator; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_compromisos);
    ctx = this;
    atx = this;
    config = new Config(ctx);

    Toolbar toolbar = (Toolbar) findViewById(R.id.app_bar);
    setSupportActionBar(toolbar);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);

    try {
        JSONObject selfuser = new JSONObject(config.get("user", "null"));
        CampoDeAccion = selfuser.getString("fieldaction_id");
    } catch (JSONException e) {}
    int fieldToaction = Integer.parseInt(CampoDeAccion);

    activityPager = (ViewPager) findViewById(R.id.activityPager);
    activityPager.setAdapter(new CompromisoPagerApadter(ctx, getSupportFragmentManager(), fieldToaction));

    CircleIndicator circleIndicator = (CircleIndicator) findViewById(R.id.circleIndicator);
    circleIndicator.setViewPager(activityPager);
}
 
开发者ID:dannegm,项目名称:BrillaMXAndroid,代码行数:25,代码来源:Compromisos.java

示例7: onCreate

import me.relex.circleindicator.CircleIndicator; //导入依赖的package包/类
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // Hide the zygote background to speed up rendering. Only when activities have
        // their own background set.
        // tip from http://cyrilmottier.com/2013/01/23/android-app-launching-made-gorgeous/
        //getWindow().setBackgroundDrawable(null);
        setContentView(R.layout.activity_tutorial);

        ButterKnife.bind(this);

        CircleIndicator circleIndicator = (CircleIndicator) findViewById(R.id.indicator_default);

        ViewPager viewpager = (ViewPager) findViewById(R.id.viewpager_default);
        TutorialPagerAdapter pagerAdapter = new TutorialPagerAdapter(getSupportFragmentManager());
        viewpager.setAdapter(pagerAdapter);
        circleIndicator.setViewPager(viewpager);

//        TextView skipText = (TextView) findViewById(R.id.skipTextView);
//        skipText.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View view) {
//                onCloseClicked();
//            }
//        });
    }
 
开发者ID:moneymanagerex,项目名称:android-money-manager-ex,代码行数:27,代码来源:TutorialActivity.java

示例8: MyTBAOnboardingViewPager

import me.relex.circleindicator.CircleIndicator; //导入依赖的package包/类
public MyTBAOnboardingViewPager(Context context, AttributeSet attrs) {
    super(context, attrs);

    LayoutInflater.from(context).inflate(R.layout.mytba_onboarding_view_pager, this, true);

    myTBATitle = (TextView) findViewById(R.id.mytba_title);
    myTBASubtitle = (TextView) findViewById(R.id.mytba_subtitle);

    mViewPager = (ViewPager) findViewById(R.id.view_pager);
    mViewPager.setAdapter(new MyTBAOnboardingPagerAdapter(mViewPager));
    mViewPager.setOffscreenPageLimit(10);

    CircleIndicator indicator = (CircleIndicator) findViewById(R.id.mytba_pager_indicator);
    indicator.setViewPager(mViewPager);

    mSignInButton = findViewById(R.id.google_sign_in_button);
    mSignInButton.setOnClickListener(this);
}
 
开发者ID:the-blue-alliance,项目名称:the-blue-alliance-android,代码行数:19,代码来源:MyTBAOnboardingViewPager.java

示例9: onViewCreated

import me.relex.circleindicator.CircleIndicator; //导入依赖的package包/类
@Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    ViewPager viewpager = (ViewPager) view.findViewById(R.id.viewpager);
    CircleIndicator indicator = (CircleIndicator) view.findViewById(R.id.indicator);
    viewpager.setAdapter(new SamplePagerAdapter());
    indicator.setViewPager(viewpager);
    viewpager.setCurrentItem(2);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:8,代码来源:DefaultFragment.java

示例10: onViewCreated

import me.relex.circleindicator.CircleIndicator; //导入依赖的package包/类
@Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    mViewpager = (ViewPager) view.findViewById(R.id.viewpager);
    mIndicator = (CircleIndicator) view.findViewById(R.id.indicator);
    mViewpager.setAdapter(new SamplePagerAdapter(5));
    mIndicator.setViewPager(mViewpager);

    view.findViewById(R.id.button).setOnClickListener(new View.OnClickListener() {
        @Override public void onClick(View v) {
            mViewpager.setAdapter(new SamplePagerAdapter(1 + mRandom.nextInt(5)));
            mIndicator.setViewPager(mViewpager);
        }
    });
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:14,代码来源:ResetAdapterFragment.java

示例11: onCreate

import me.relex.circleindicator.CircleIndicator; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Utils.hideStatusbar(this);
    setContentView(R.layout.activity_main);
    ButterKnife.bind(this);
    mPagerAdapter = new ScreenSlidePagerAdapter(getSupportFragmentManager());
    viewPager.setAdapter(mPagerAdapter);
    CircleIndicator indicator = (CircleIndicator) findViewById(R.id.indicator);
    indicator.setViewPager(viewPager);
    viewPager.addOnPageChangeListener(new ArianaBackgroundListener(Utils.getColors(), imageView, viewPager));
}
 
开发者ID:akshay2211,项目名称:Ariana,代码行数:13,代码来源:MainActivity.java

示例12: onViewCreated

import me.relex.circleindicator.CircleIndicator; //导入依赖的package包/类
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    AutoScrollViewPager viewPager = view.findViewById(R.id.view_pager);
    ApplicationHelper.setup(viewPager, getChildFragmentManager(), getContext());

    CircleIndicator indicator = view.findViewById(R.id.indicator);
    indicator.setViewPager(viewPager);

    AdsManager.loadAds(getContext(), view);
}
 
开发者ID:tranleduy2000,项目名称:text_converter,代码行数:12,代码来源:AdsFragment.java

示例13: initializeViews

import me.relex.circleindicator.CircleIndicator; //导入依赖的package包/类
private void initializeViews() {
    mViewPager = (ViewPager) findViewById(R.id.view_pager);
    mCircleIndicator = (CircleIndicator) findViewById(R.id.viewPagerIndicator);
    mAdapter = new ViewPagerAdapter(getSupportFragmentManager());
    mViewPager.setAdapter(mAdapter);
    mCircleIndicator.setViewPager(mViewPager);
}
 
开发者ID:narenkukreja,项目名称:quire,代码行数:8,代码来源:WelcomeActivity.java

示例14: onCreate

import me.relex.circleindicator.CircleIndicator; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Utils.hideStatusbar(this);
    setContentView(R.layout.activity_sample2);
    mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());
    mViewPager = (ViewPager) findViewById(R.id.container);
    CircleIndicator indicator = (CircleIndicator) findViewById(R.id.indicator);
    mViewPager.setAdapter(mSectionsPagerAdapter);
    indicator.setViewPager(mViewPager);
}
 
开发者ID:akshay2211,项目名称:Oblique,代码行数:12,代码来源:SampleTwoActivity.java

示例15: onCreateView

import me.relex.circleindicator.CircleIndicator; //导入依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
  View rootView = inflater.inflate(R.layout.activity_walkthrough, container, false);

  viewRoot = (ViewGroup) rootView.findViewById(R.id.viewRoot);
  topLabelsContainer = (ViewGroup) rootView.findViewById(R.id.topLabelsContainer);
  topNameContainer = (ViewGroup) rootView.findViewById(R.id.topNameContainer);

  lbl2DoName = (TextView) rootView.findViewById(R.id.lbl2DoName);
  lbl2DoVersion = (TextView) rootView.findViewById(R.id.lbl2DoVersion);
  lblWelcomeTitle = (TextView) rootView.findViewById(R.id.lblWelcomeTitle);

  lblWatchVideo = (TextView) rootView.findViewById(R.id.lblWatchVideo);

  phoneContainer = (ViewGroup) rootView.findViewById(R.id.phoneContainer);
  imgPhoneFrame = (AppCompatImageView) rootView.findViewById(R.id.imgPhoneFrame);
  imgPhoneShot = (ScaleImageView) rootView.findViewById(R.id.imgPhoneShot);

  bottomContainer = (ViewGroup) rootView.findViewById(R.id.bottomContainer);
  tutorialPager = (ViewPager) rootView.findViewById(R.id.tutorialPager);

  circularIndicator = (CircleIndicator) rootView.findViewById(R.id.circularIndicator);

  btnDone = (AppCompatButton) rootView.findViewById(R.id.btnDone);
  btnDone.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
      doneClicked();
    }
  });

  return rootView;
}
 
开发者ID:guidedways,项目名称:walkthrough_onboarding,代码行数:36,代码来源:WalkthroughActivityFragment.java


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