本文整理了Java中com.alibaba.android.arouter.facade.annotation.Route.<init>
方法的一些代码示例,展示了Route.<init>
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Route.<init>
方法的具体详情如下:
包路径:com.alibaba.android.arouter.facade.annotation.Route
类名称:Route
方法名:<init>
暂无
代码示例来源: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: JessYanCoding/ArmsComponent
@Route(path = RouterHub.APP_SPLASHACTIVITY)
public class SplashActivity extends BaseActivity {
@Override
代码示例来源:origin: JessYanCoding/ArmsComponent
@Route(path = RouterHub.GANK_HOMEACTIVITY)
public class GankHomeActivity extends BaseActivity<GankHomePresenter> implements GankHomeContract.View, SwipeRefreshLayout.OnRefreshListener {
@BindView(R2.id.recyclerView)
代码示例来源:origin: JessYanCoding/ArmsComponent
@Route(path = RouterHub.APP_MAINACTIVITY)
public class MainActivity extends BaseActivity {
@BindView(R.id.bt_zhihu)
代码示例来源: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: WuXiaolong/ModularSample
@Route(path = RouterConstants.MODULE1_MAIN_ACTIVITY)
public class MainActivity extends BaseActivity {
代码示例来源:origin: InnoFang/Android-Code-Demos
@Route(path = "/module_a/1")
public class ModuleAActivity extends AppCompatActivity {
@Autowired
public int num;
@Autowired
public String str;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_module_a);
ARouter.getInstance().inject(this);
Toast.makeText(this, "num: " + num + " str: " + str, Toast.LENGTH_SHORT).show();
}
}
代码示例来源:origin: JingYeoh/SupportFragment
/**
* 好友列表
* Created by yangjing on 17-6-7.
*/
@Route(path = AppConfig.RouterPath.USER_FRIENDS_LIST)
@SupportWindow(immersiveStatus = true)
@SupportContent(contentViewId = R.layout.frg_user_friends_list)
public class FriendsListFragment extends BaseFragment {
@Override
public void initView() {
}
@Override
public void initData(Bundle savedInstanceState) {
}
@Override
public void initListener() {
}
}
代码示例来源:origin: JingYeoh/SupportFragment
/**
* 好友列表
* Created by yangjing on 17-6-7.
*/
@Route(path = AppConfig.RouterPath.USER_CHAT_LIST)
@SupportWindow(immersiveStatus = true)
@SupportContent(contentViewId = R.layout.frg_user_chat_list)
public class ChatListFragment extends BaseFragment {
@Override
public void initView() {
}
@Override
public void initData(Bundle savedInstanceState) {
}
@Override
public void initListener() {
}
}
代码示例来源:origin: JingYeoh/SupportFragment
/**
* 左侧滑菜单
* Created by yangjing on 17-6-5.
*/
@Route(path = AppConfig.RouterPath.APP_MAIN_SLIDE_LEFT)
@SupportWindow(immersiveStatus = true)
@SupportContent(contentViewId = R.layout.frg_menu_left)
public class SlideMenuLeftFragment extends BaseFragment {
@Override
public void initView() {
}
@Override
public void initData(Bundle savedInstanceState) {
}
@Override
public void initListener() {
}
}
内容来源于网络,如有侵权,请联系作者删除!