AndroidStudio Template之launch
2018-08-28 本文已影响30人
NoValue
快速写入一个Activity的launch代码
public static void launch(Context context){
Intent intent = new Intent(context, $class$.class);
ActivityUtil.switchTo(context, intent);
}
达到的效果如下:


需要新建一个Live Template

template 代码
public static void launch(Context context){
Intent intent = new Intent(context, $class$.class);
ActivityUtil.switchTo(context, intent);
}