• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java SwipeBackHelper类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: beforeSetContentView

import com.jude.swipbackhelper.SwipeBackHelper; //导入依赖的package包/类
public void beforeSetContentView() {
        SwipeBackHelper.onCreate(this);
//        SwipeBackHelper.getCurrentPage(this)//获取当前页面
//                .setSwipeBackEnable(true)//设置是否可滑动
//                .setSwipeEdge(200)//可滑动的范围。px。200表示为左边200px的屏幕
//                .setSwipeEdgePercent(0.2f)//可滑动的范围。百分比。0.2表示为左边20%的屏幕
//                .setSwipeSensitivity(0.5f)//对横向滑动手势的敏感程度。0为迟钝 1为敏感
//                .setScrimColor(Color.BLUE)//底层阴影颜色
//                .setClosePercent(0.8f)//触发关闭Activity百分比
//                .setSwipeRelateEnable(false)//是否与下一级activity联动(微信效果)。默认关
//                .setSwipeRelateOffset(500)//activity联动时的偏移量。默认500px。
//                .setDisallowInterceptTouchEvent(true)//不抢占事件,默认关(事件将先由子View处理再由滑动关闭处理)
//                .addListener(new SwipeListener() {//滑动监听
        SwipeBackHelper.getCurrentPage(this)
                .setSwipeBackEnable(true)
                .setSwipeSensitivity(0.5f)
                .setSwipeEdge(200)
                .setSwipeRelateEnable(true)
                .setSwipeRelateOffset(300);

    }
 
开发者ID:SiberiaDante,项目名称:AndroidUtilLib,代码行数:22,代码来源:BaseActivity.java


示例2: onCreate

import com.jude.swipbackhelper.SwipeBackHelper; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_my_collection);
    ActivityCollector.addActivity(this);
    SwipeBackHelper.onCreate(this);
    SwipeBackHelper.getCurrentPage(this)
            .setSwipeEdgePercent(0.2f)
            .setSwipeSensitivity(0.3f);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    if (toolbar != null) {
        setSupportActionBar(toolbar);
        toolbar.setNavigationIcon(R.drawable.ic_fanhui);
        toolbar.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onBackPressed();
            }
        });
    }
    mProgress = (RelativeLayout) findViewById(R.id.progress_layout);
    mEmpty = (RelativeLayout) findViewById(R.id.empty);
    setData();

}
 
开发者ID:Fukago,项目名称:TravelBan,代码行数:26,代码来源:MyCollectionActivity.java


示例3: onCreate

import com.jude.swipbackhelper.SwipeBackHelper; //导入依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState){
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_imageview);
    SwipeBackHelper.getCurrentPage(this).setSwipeBackEnable(false);
    mTv_lock = (TextView) findViewById(R.id.lock);
    mTv_return = (ImageView) findViewById(R.id.home);
    mTv_title = (TextView) findViewById(R.id.title);
    mTv_title.setOnClickListener(this);
    mTv_lock.setOnClickListener(this);
    mTv_return.setOnClickListener(this);

    mViewPager = (HackyViewPager) findViewById(R.id.viewpager);
    mAdapter = new ImagePagerAdapter();
    mViewPager.setAdapter(mAdapter);
    ArrayList<Uri> urls = getIntent().getParcelableArrayListExtra(KEY_URIS);
    int index = getIntent().getIntExtra(KEY_INDEX,0);
    if (urls==null||urls.size()<=1){
        mTv_lock.setVisibility(View.GONE);
        mViewPager.toggleLock();
    }
    mAdapter.setUrls(urls);
    mViewPager.setCurrentItem(index);
}
 
开发者ID:Jude95,项目名称:Fishing,代码行数:25,代码来源:ImageViewActivity.java


示例4: onCreate

import com.jude.swipbackhelper.SwipeBackHelper; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.place_activity_path);
    SwipeBackHelper.getCurrentPage(this).setSwipeBackEnable(false);
    ButterKnife.inject(this);
    mMapView.onCreate(savedInstanceState);
    mPlaceDetail = (PlaceDetail) getIntent().getSerializableExtra("place");
    initAMapView();
    calculateDriveRoute();
    drive.setOnClickListener(v -> calculateDriveRoute());
    walk.setOnClickListener(v->calculateFootRoute());
    ok.setOnClickListener(v-> {
        Intent i = new Intent(this,PlaceNavigationActivity.class);
        startActivity(i);
    });
}
 
开发者ID:Jude95,项目名称:Fishing,代码行数:18,代码来源:PlaceMapPathActivity.java


示例5: onCreate

import com.jude.swipbackhelper.SwipeBackHelper; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    SwipeBackHelper.onCreate(this);
    SwipeBackHelper.getCurrentPage(this)
            .setSwipeBackEnable(true)
            .setSwipeEdgePercent(0.2f)//0.2 mean left 20% of screen can touch to begin swipe.
            .setSwipeSensitivity(1)//sensitiveness of the gesture。0:slow  1:sensitive
            .setScrimColor(Color.TRANSPARENT)//color of Scrim below the activity
            .setClosePercent(0.8f)//close activity when swipe over this
            .setSwipeRelateEnable(true)//if should move together with the following Activity
            .setSwipeRelateOffset(500)//the Offset of following Activity when setSwipeRelateEnable(true)
            .setDisallowInterceptTouchEvent(false);
}
 
开发者ID:smuyyh,项目名称:SprintNBA,代码行数:15,代码来源:BaseSwipeBackCompatActivity.java


示例6: onCreate

import com.jude.swipbackhelper.SwipeBackHelper; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.base_activity);

    App.addActivity(this);
    SwipeBackHelper.onCreate(this);

    initFrame();
}
 
开发者ID:ydmmocoo,项目名称:StudyApp,代码行数:11,代码来源:BaseActivity.java


示例7: onDestroy

import com.jude.swipbackhelper.SwipeBackHelper; //导入依赖的package包/类
@Override
protected void onDestroy() {
    super.onDestroy();
    ButterKnife.unbind(this);
    SwipeBackHelper.onDestroy(this);
    unsubscribe();
    KLog.i("onDestroy");
}
 
开发者ID:ydmmocoo,项目名称:StudyApp,代码行数:9,代码来源:BaseActivity.java


示例8: onCreate

import com.jude.swipbackhelper.SwipeBackHelper; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.base_title_activity);

    App.addActivity(this);
    SwipeBackHelper.onCreate(this);

    initFrame();
    init();
}
 
开发者ID:ydmmocoo,项目名称:StudyApp,代码行数:12,代码来源:BaseTitleBarActivity.java


示例9: onCreate

import com.jude.swipbackhelper.SwipeBackHelper; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    SwipeBackHelper.onCreate(this);
    SwipeBackHelper.getCurrentPage(this)
            .setSwipeBackEnable(true)
            .setSwipeSensitivity(0.5f)
            .setSwipeRelateEnable(true);

}
 
开发者ID:The-LoneWolf,项目名称:AndroPress,代码行数:11,代码来源:SwipeBaseActivity.java


示例10: onCreate

import com.jude.swipbackhelper.SwipeBackHelper; //导入依赖的package包/类
@Override protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  SwipeBackHelper.onCreate(this);

  setContentView(R.layout.activity_mail_content);

  mMailTitle = (TextView) findViewById(R.id.mail_content_title);
  // init post widget
  mPostAuthor = (TextView) findViewById(R.id.post_author);
  mPostIndex = (TextView) findViewById(R.id.post_index);
  mPostIndex.setVisibility(View.GONE);
  mPostPublishDate = (TextView) findViewById(R.id.post_publish_date);
  mViewGroup = (LinearLayout) findViewById(R.id.post_content_holder);
  mPostContent = (LinkConsumableTextView) findViewById(R.id.post_content);

  Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
  setSupportActionBar(toolbar);

  // Show the Up button in the action bar.
  ActionBar actionBar = getSupportActionBar();
  if (actionBar != null) {
    actionBar.setDisplayHomeAsUpEnabled(true);
  }

  // load mMail content
  Bundle bundle = getIntent().getExtras();
  mMail = (Mail) bundle.getParcelable(SMTHApplication.MAIL_OBJECT);
  loadMailContent();
}
 
开发者ID:zfdang,项目名称:zSMTH-Android,代码行数:30,代码来源:MailContentActivity.java


示例11: onCreate

import com.jude.swipbackhelper.SwipeBackHelper; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_about);
    ActivityCollector.addActivity(this);
    SwipeBackHelper.onCreate(this);
    SwipeBackHelper.getCurrentPage(this)
            .setSwipeEdgePercent(0.2f)
            .setSwipeSensitivity(0.3f);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    if (toolbar != null) {
        setSupportActionBar(toolbar);
        toolbar.setNavigationIcon(R.drawable.ic_fanhui);
        toolbar.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onBackPressed();
            }
        });
    }
    mTextView1 = (TextView) findViewById(R.id.text);
    mTextView2 = (TextView) findViewById(R.id.text2);
    mTextView3 = (TextView) findViewById(R.id.text3);
    mTextView1.setText("驴友邦");
    mTextView2.setText("Version   1.0.1");
    mTextView3.setText("开发者邮箱:[email protected]");
}
 
开发者ID:Fukago,项目名称:TravelBan,代码行数:28,代码来源:AboutActivity.java


示例12: onCreate

import com.jude.swipbackhelper.SwipeBackHelper; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_write);
    SwipeBackHelper.onCreate(this);
    SwipeBackHelper.getCurrentPage(this)
            .setSwipeEdgePercent(0.2f)
            .setSwipeSensitivity(0.3f);
    ActivityCollector.addActivity(this);
    initView();
}
 
开发者ID:Fukago,项目名称:TravelBan,代码行数:12,代码来源:WriteActivity.java


示例13: onCreate

import com.jude.swipbackhelper.SwipeBackHelper; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_register);
    ActivityCollector.addActivity(this);
    SwipeBackHelper.onCreate(this);
    SwipeBackHelper.getCurrentPage(this)
            .setSwipeEdgePercent(0.2f)
            .setSwipeSensitivity(0.3f);
    Bmob.initialize(this, "dbff096320f269ffc3a981bcdcb8adde");
    iniView();
}
 
开发者ID:Fukago,项目名称:TravelBan,代码行数:13,代码来源:RegisterActivity.java


示例14: onCreate

import com.jude.swipbackhelper.SwipeBackHelper; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    SwipeBackHelper.onCreate(this);
    SwipeBackHelper.getCurrentPage(this)
            .setSwipeEdgePercent(0.2f)
            .setSwipeSensitivity(0.3f);
    ActivityCollector.addActivity(this);
    setContentView(R.layout.activity_user_data);
    setData();
    initView();
}
 
开发者ID:Fukago,项目名称:TravelBan,代码行数:13,代码来源:UserDataActivity.java


示例15: onCreate

import com.jude.swipbackhelper.SwipeBackHelper; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_adweb);
    ActivityCollector.addActivity(this);
    SwipeBackHelper.onCreate(this);
    SwipeBackHelper.getCurrentPage(this)
            .setSwipeEdgePercent(0.2f)
            .setSwipeSensitivity(0.3f);
    setData();
    initView();
}
 
开发者ID:Fukago,项目名称:TravelBan,代码行数:13,代码来源:ADWebActivity.java


示例16: onCreate

import com.jude.swipbackhelper.SwipeBackHelper; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main_activity_main);
    SwipeBackHelper.getCurrentPage(this).setSwipeBackEnable(false);
    ButterKnife.inject(this);
    mDrawerToggle = new ActionBarDrawerToggle(this
            , drawerLayout
            , (Toolbar) findViewById(R.id.toolbar)
            , 0
            , 0);
    drawerLayout.post(() -> mDrawerToggle.syncState());
    drawerLayout.setDrawerListener(mDrawerToggle);
    init();
}
 
开发者ID:Jude95,项目名称:Fishing,代码行数:16,代码来源:MainActivity.java


示例17: onCreate

import com.jude.swipbackhelper.SwipeBackHelper; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.place_activity_select_location);
    SwipeBackHelper.getCurrentPage(this).setSwipeBackEnable(false);
    ButterKnife.inject(this);
    canSelect = getIntent().getBooleanExtra("can",false);
    locationMessage = getIntent().getParcelableExtra("location");
    mMapView.onCreate(savedInstanceState);
    initMap();
    if (locationMessage!=null){
        ok.setVisibility(View.GONE);
    }
    ok.setOnClickListener(v -> {
        if (RongYunModel.getInstance().getLastLocationCallback()!=null){
            RongYunModel.getInstance().getLastLocationCallback().onSuccess(locationMessage);
            RongYunModel.getInstance().setLastLocationCallback(null);
        }else {
            Intent i = new Intent();
            i.putExtra("point", mPoint);
            i.putExtra("address", mAddress);
            i.putExtra("briefAddress", mBriefAddress);
            setResult(Activity.RESULT_OK, i);
        }
        finish();
    });
}
 
开发者ID:Jude95,项目名称:Fishing,代码行数:28,代码来源:PlaceLocationSelectActivity.java


示例18: onCreate

import com.jude.swipbackhelper.SwipeBackHelper; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.place_activity_navigation);
    ButterKnife.inject(this);
    SwipeBackHelper.getCurrentPage(this).setSwipeBackEnable(false);
    TTSController.getInstance(this).startSpeaking();

    navigation.onCreate(savedInstanceState);
    navigation.setAMapNaviViewListener(this);
    setAmapNaviViewOptions();
    AMapNavi.getInstance(this).startNavi(AMapNavi.GPSNaviMode);

}
 
开发者ID:Jude95,项目名称:Fishing,代码行数:15,代码来源:PlaceNavigationActivity.java


示例19: onCreate

import com.jude.swipbackhelper.SwipeBackHelper; //导入依赖的package包/类
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
//        APP.getInstance().RefWatcher.watch(getActivity());
        SwipeBackHelper.onCreate(getActivity());
        JActivityManager.getInstance().pushActivity(getActivity());
        PushAgent.getInstance(getActivity()).onAppStart();
    }
 
开发者ID:Jude95,项目名称:Fishing,代码行数:9,代码来源:ActivityDelegate.java


示例20: onPostCreate

import com.jude.swipbackhelper.SwipeBackHelper; //导入依赖的package包/类
@Override
protected void onPostCreate(@Nullable Bundle savedInstanceState) {
    super.onPostCreate(savedInstanceState);
    SwipeBackHelper.onPostCreate(this);
}
 
开发者ID:Shmilyz,项目名称:Swap,代码行数:6,代码来源:ShoesActivity.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java NamingContextBindingsEnumeration类代码示例发布时间:2022-05-22
下一篇:
Java ThreadDeathEvent类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap