Giter VIP home page Giter VIP logo

component's Introduction

页面跳转:

  1. ARouter.getInstance().build(RouterConfig.GOODS_GOODS_DETAIL_ACTIVITY).greenChannel().navigation(getActivity(), new NavigationCallback() { @Override public void onFound(Postcard postcard) { //找到页面 }

             @Override
             public void onLost(Postcard postcard) {
                 //找不到页面
             }
    
             @Override
             public void onArrival(Postcard postcard) {
                 //打开页面
             }
    
             @Override
             public void onInterrupt(Postcard postcard) {
                 //被拦截器拦截
             }
         });
    
  2. 如果不想走拦截器: ARouter.getInstance().build(RouterConfig.GOODS_GOODS_DETAIL_ACTIVITY).greenChannel().navigation();

  3. 获取fragment: (Fragment) ARouter.getInstance().build("/home/homefragment").navigation()

偏好设置: SPUtil.java Toast: ToastUtil.java

设置ToolBar: 只设置标题: 继承BaseActivity或者SwipeActivity ,调用 setTitle("我是标题")方法设置; 设置多个属性: titleBar.setCenterText("发布采购")

                        .setLeftIcon(R.drawable.nav_back)
                        .setLeftIconOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View v) {
                                Log.i(TAG, "onClick: 左边图标");
                            }
                        })
                        .setLeftText("取消")
                        .setLeftTextPaddingLeft(4)
                        .setLeftTextOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View view) {
                                Log.i(TAG, "onClick: 左边文字");
                            }
                        })
                        .setRightIcon(R.drawable.nav_back)
                        .setRightIconOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View v) {
                                Log.i(TAG, "onClick: 右侧图标");
                            }
                        })
                        .setRightText("保存")
                        .setRightTextPaddingRight(4)
                        .setRightTextOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View v) {
                                Log.i(TAG, "onClick: 右边文字");
                            }
                        })
                ;

component's People

Contributors

kbq670554802 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.