com.alibaba.android.arouter.facade.annotation.Route类的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(7.3k)|赞(0)|评价(0)|浏览(251)

本文整理了Java中com.alibaba.android.arouter.facade.annotation.Route类的一些代码示例,展示了Route类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Route类的具体详情如下:
包路径:com.alibaba.android.arouter.facade.annotation.Route
类名称:Route

Route介绍

暂无

代码示例

代码示例来源:origin: JessYanCoding/ArmsComponent

/**
 * ================================================
 * 向外提供服务的接口实现类, 在此类中实现一些具有特定功能的方法提供给外部, 即可让一个组件与其他组件或宿主进行交互
 *
 * @see <a href="https://github.com/JessYanCoding/ArmsComponent/wiki#2.2.3.2">CommonService wiki 官方文档</a>
 * Created by JessYan on 2018/4/27 14:27
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * ================================================
 */
@Route(path = RouterHub.GANK_SERVICE_GANKINFOSERVICE, name = "干货集中营信息服务")
public class GankInfoServiceImpl implements GankInfoService {
  private Context mContext;

  @Override
  public GankInfo getInfo() {
    return new GankInfo(ArmsUtils.getString(mContext, R.string.public_name_gank));
  }

  @Override
  public void init(Context context) {
    mContext = context;
  }
}

代码示例来源:origin: CaMnter/AndroidLife

/**
 * Type
 *
 * @param route route
 * @param rawType rawType
 * @param type type
 * @param paramsType paramsType
 */
public RouteMeta(Route route, Element rawType, RouteType type, Map<String, Integer> paramsType) {
  this(type, rawType, null, route.path(), route.group(), paramsType, route.priority(),
    route.extras());
}

代码示例来源:origin: JessYanCoding/ArmsComponent

@Route(path = RouterHub.APP_SPLASHACTIVITY)
public class SplashActivity extends BaseActivity {
  @Override

代码示例来源:origin: com.alibaba/arouter-annotation

/**
 * Type
 *
 * @param route       route
 * @param destination destination
 * @param type        type
 */
public RouteMeta(Route route, Class<?> destination, RouteType type) {
  this(type, null, destination, route.name(), route.path(), route.group(), null, route.priority(), route.extras());
}

代码示例来源:origin: JessYanCoding/ArmsComponent

@Route(path = RouterHub.GANK_HOMEACTIVITY)
public class GankHomeActivity extends BaseActivity<GankHomePresenter> implements GankHomeContract.View, SwipeRefreshLayout.OnRefreshListener {
  @BindView(R2.id.recyclerView)

代码示例来源:origin: CaMnter/AndroidLife

/**
 * Type
 *
 * @param route route
 * @param destination destination
 * @param type type
 */
public RouteMeta(Route route, Class<?> destination, RouteType type) {
  this(type, null, destination, route.path(), route.group(), null, route.priority(),
    route.extras());
}

代码示例来源:origin: JessYanCoding/ArmsComponent

@Route(path = RouterHub.APP_MAINACTIVITY)
public class MainActivity extends BaseActivity {
  @BindView(R.id.bt_zhihu)

代码示例来源:origin: com.alibaba/arouter-annotation

/**
 * Type
 *
 * @param route      route
 * @param rawType    rawType
 * @param type       type
 * @param paramsType paramsType
 */
public RouteMeta(Route route, Element rawType, RouteType type, Map<String, Integer> paramsType) {
  this(type, rawType, null, route.name(), route.path(), route.group(), paramsType, route.priority(), route.extras());
}

代码示例来源:origin: WuXiaolong/ModularSample

@Route(path = RouterConstants.MODULE1_MODULE1_FRAGMENT)
public class Module1Fragment extends Fragment {

  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
               Bundle savedInstanceState) {
    // Inflate the layout for this fragment
    return inflater.inflate(R.layout.module1_fragment_module1, container, false);
  }

}

代码示例来源:origin: cr330326/DemoComponent

/**
 * Created by chenran3 on 2017/11/21.
 */

@Route(path = RouterPath.ROUTER_PATH_TO_LOGIN_SERVICE, name = "登陆页面")
public class LoginService implements ILoginProvider {
  @Override
  public void init(Context context) {}

  @Override
  public void goToLogin(Activity activity) {
    Intent loginIntent = new Intent(activity, LoginActivity.class);
    activity.startActivity(loginIntent);
  }
}

代码示例来源:origin: cr330326/DemoComponent

/**
 * Created by chenran3 on 2017/11/21.
 */

@Route(path = RouterPath.ROUTER_PATH_TO_SETTING_SERVICE, name = "设置页面")
public class SettingService implements ISettingProvider {
  @Override
  public void init(Context context) {}
  

  @Override
  public void goToSetting(Activity activity) {
    Intent loginIntent = new Intent(activity, SettingActivity.class);
    activity.startActivity(loginIntent);
  }
}

代码示例来源:origin: Jerey-Jobs/KeepGank

/**
 * @author Xiamin
 * @date 2017/8/17
 */
@Route(path = "/douban/DoubanActivity")
public class DoubanActivity extends SingleFragmentActivity{
  @Override
  protected Fragment getFragment() {
    return new DoubanFragment();
  }

  @Override
  protected Bundle getArguments() {
    return null;
  }
}

代码示例来源:origin: WuXiaolong/ModularSample

/**
 * Created by WuXiaolong on 2017/7/24.
 * 个人博客:http://wuxiaolong.me
 */
@Route(path = RouterConstants.MODULE1_SERVICE_IMPL)
public class Module1ServiceImpl implements Module1Service {
  @Override
  public boolean share() {
    Log.d("wxl","share");
    return true;
  }

  @Override
  public void init(Context context) {
    Log.d("wxl","init="+context);
  }
}

代码示例来源:origin: ymback/NGA-CLIENT-VER-OPEN-SOURCE

@Route(path = ARouterConstants.ACTIVITY_NOTIFICATION)
public class RecentNotificationActivity extends BaseActivity {

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    FragmentManager fm = getSupportFragmentManager();
    Fragment fragment = fm.findFragmentById(android.R.id.content);
    if (fragment == null) {
      fragment = new RecentNotificationFragment();
      fragment.setArguments(getIntent().getExtras());
      fm.beginTransaction().add(android.R.id.content, fragment).commit();
    }
    setTitle("我的被喷");
    ActionBar actionBar = getSupportActionBar();
    if (actionBar != null) {
      actionBar.setDisplayHomeAsUpEnabled(true);
      actionBar.setDisplayShowHomeEnabled(true);
    }

  }

}

代码示例来源:origin: ymback/NGA-CLIENT-VER-OPEN-SOURCE

@Route(path = ARouterConstants.ACTIVITY_LOGIN)
public class LoginActivity extends BaseActivity {

  private BaseFragment mLoginFragment;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mLoginFragment = new LoginWebFragment();
    getSupportFragmentManager().beginTransaction().replace(android.R.id.content, mLoginFragment).commit();
    ActionBar actionBar = getSupportActionBar();
    if (actionBar != null) {
      actionBar.setDisplayHomeAsUpEnabled(true);
      actionBar.setDisplayShowHomeEnabled(true);
    }
  }

  @Override
  public void onBackPressed() {
    if (!mLoginFragment.onBackPressed()) {
      super.onBackPressed();
    }
  }
}

代码示例来源:origin: wang709693972wei/CompontentDemo

/**
 * Created by wangwei on 2018/4/17.
 */

@Route(path = ARouterManager.AModuleActivity, group = "customGroup")
public class AModuleActivity extends BaseActivity {
  TextView txt;

  @Override
  protected int getLayoutId() {
    return R.layout.a_module_layout;
  }

  @Override
  protected void initView() {
    txt = findViewById(R.id.txt);
    txt.setOnClickListener(new View.OnClickListener() {
      @Override
      public void onClick(View v) {

      }
    });

  }
}

代码示例来源:origin: wang709693972wei/CompontentDemo

/**
 * Created by wangwei on 2018/4/28.
 */

// 如果需要传递自定义对象,需要实现 SerializationService,并使用@Route注解标注(方便用户自行选择序列化方式),例如:
@Route(path = "/service/json")
public class JsonServiceImpl implements SerializationService {
  @Override
  public void init(Context context) {

  }

  @Override
  public <T> T json2Object(String text, Class<T> clazz) {
    Log.w("TAG", "text---" + text);
    return new Gson().fromJson(text, clazz);
  }

  @Override
  public String object2Json(Object instance) {
    Log.w("TAG", "Object---" + instance);
    return new Gson().toJson(instance);
  }
}

代码示例来源:origin: renxuelong/ComponentDemo

@Route(path = "/share/share")
public class ShareActivity extends AppCompatActivity {

代码示例来源:origin: chendongMarch/LightAdapter

@Route(path = BuildInService.IMAGE, name = "图片服务")
public class ImageServiceImpl implements IImageService {

代码示例来源:origin: zhujian1989/gank.io

@Route(path = "/about/aboutActivity")
public class AboutActivity extends BaseActivity {

相关文章