Search in sources :

Example 1 with Once

use of me.drakeet.meizhi.util.Once in project Meizhi by drakeet.

the class BaseActivity method loginGitHub.

protected void loginGitHub() {
    new Once(this).show(R.string.action_github_login, () -> {
        Toasts.showLongX2(getString(R.string.tip_login_github));
    });
    String url = getString(R.string.url_login_github);
    Intent intent = WebActivity.newIntent(this, url, getString(R.string.action_github_login));
    startActivity(intent);
}
Also used : Once(me.drakeet.meizhi.util.Once) Intent(android.content.Intent)

Example 2 with Once

use of me.drakeet.meizhi.util.Once in project Meizhi by drakeet.

the class MainActivity method setupRecyclerView.

private void setupRecyclerView() {
    final StaggeredGridLayoutManager layoutManager = new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL);
    mRecyclerView.setLayoutManager(layoutManager);
    mMeizhiListAdapter = new MeizhiListAdapter(this, mMeizhiList);
    mRecyclerView.setAdapter(mMeizhiListAdapter);
    new Once(this).show("tip_guide_6", () -> {
        Snackbar.make(mRecyclerView, getString(R.string.tip_guide), Snackbar.LENGTH_INDEFINITE).setAction(R.string.i_know, v -> {
        }).show();
    });
    mRecyclerView.addOnScrollListener(getOnBottomListener(layoutManager));
    mMeizhiListAdapter.setOnMeizhiTouchListener(getOnMeizhiTouchListener());
}
Also used : Bundle(android.os.Bundle) ButterKnife(butterknife.ButterKnife) me.drakeet.meizhi.data.休息视频Data(me.drakeet.meizhi.data.休息视频Data) Date(java.util.Date) Toasts(me.drakeet.meizhi.util.Toasts) AndroidSchedulers(rx.android.schedulers.AndroidSchedulers) Intent(android.content.Intent) OnClick(butterknife.OnClick) MenuItem(android.view.MenuItem) ArrayList(java.util.ArrayList) Observable(rx.Observable) Picasso(com.squareup.picasso.Picasso) Meizhi(me.drakeet.meizhi.data.entity.Meizhi) OnMeizhiTouchListener(me.drakeet.meizhi.func.OnMeizhiTouchListener) Dates(me.drakeet.meizhi.util.Dates) Handler(android.os.Handler) Menu(android.view.Menu) View(android.view.View) Bind(butterknife.Bind) R(me.drakeet.meizhi.R) Gank(me.drakeet.meizhi.data.entity.Gank) StaggeredGridLayoutManager(android.support.v7.widget.StaggeredGridLayoutManager) SwipeRefreshBaseActivity(me.drakeet.meizhi.ui.base.SwipeRefreshBaseActivity) ConflictAlgorithm(com.litesuits.orm.db.model.ConflictAlgorithm) ActivityOptionsCompat(android.support.v4.app.ActivityOptionsCompat) UmengUpdateAgent(com.umeng.update.UmengUpdateAgent) ActivityCompat(android.support.v4.app.ActivityCompat) MeizhiData(me.drakeet.meizhi.data.MeizhiData) App(me.drakeet.meizhi.App) RecyclerView(android.support.v7.widget.RecyclerView) List(java.util.List) QueryBuilder(com.litesuits.orm.db.assit.QueryBuilder) Once(me.drakeet.meizhi.util.Once) MobclickAgent(com.umeng.analytics.MobclickAgent) PreferencesLoader(me.drakeet.meizhi.util.PreferencesLoader) Callback(com.squareup.picasso.Callback) Snackbar(android.support.design.widget.Snackbar) MeizhiListAdapter(me.drakeet.meizhi.ui.adapter.MeizhiListAdapter) AlarmManagers(me.drakeet.meizhi.util.AlarmManagers) Subscription(rx.Subscription) Once(me.drakeet.meizhi.util.Once) StaggeredGridLayoutManager(android.support.v7.widget.StaggeredGridLayoutManager) MeizhiListAdapter(me.drakeet.meizhi.ui.adapter.MeizhiListAdapter)

Aggregations

Intent (android.content.Intent)2 Once (me.drakeet.meizhi.util.Once)2 Bundle (android.os.Bundle)1 Handler (android.os.Handler)1 Snackbar (android.support.design.widget.Snackbar)1 ActivityCompat (android.support.v4.app.ActivityCompat)1 ActivityOptionsCompat (android.support.v4.app.ActivityOptionsCompat)1 RecyclerView (android.support.v7.widget.RecyclerView)1 StaggeredGridLayoutManager (android.support.v7.widget.StaggeredGridLayoutManager)1 Menu (android.view.Menu)1 MenuItem (android.view.MenuItem)1 View (android.view.View)1 Bind (butterknife.Bind)1 ButterKnife (butterknife.ButterKnife)1 OnClick (butterknife.OnClick)1 QueryBuilder (com.litesuits.orm.db.assit.QueryBuilder)1 ConflictAlgorithm (com.litesuits.orm.db.model.ConflictAlgorithm)1 Callback (com.squareup.picasso.Callback)1 Picasso (com.squareup.picasso.Picasso)1 MobclickAgent (com.umeng.analytics.MobclickAgent)1