Android Studio自帶模板

constjava

private static final int $name$ = $value$;

fbcandroid

($cast$) findViewById(R.id.$resId$);

foreachapp

for ($i$ : $data$) {
    $cursor$
}

goneide

$VIEW$.setVisibility(android.view.View.GONE);

IntentViewgradle

android.content.Intent view = new Intent();
view.setAction(Intent.ACTION_VIEW);
view.setData(android.net.Uri.parse($url$));
startActivity(view);

keyui

private static final String KEY_$value$ = "$value$";

newInstancethis

public static $fragment$ newInstance($args$) {
    $nullChecks$
    android.os.Bundle args = new Bundle();
    $addArgs$
    $fragment$ fragment = new $fragment$();
    fragment.setArguments(args);
    return fragment;
}

noInstanceurl

private $class$() {
    //no instance
}

rgS.net

$resources$.getString(R.string.$stringId$)

rouiTcode

getActivity().runOnUiThread(new java.lang.Runnable() {
    @Override
    public void run() {
        $cursor$
    }
});

sbc

///////////////////////////////////////////////////////////////////////////
// $blockName$
///////////////////////////////////////////////////////////////////////////

Sfmt

String.format("$string$", $params$);

starter

public static void start(android.content.Context context) {
    android.content.Intent starter = new Intent(context, $ACTIVITY$.class);
    starter.putExtra($CURSOR$);
    context.startActivity(starter);
}

Toast

android.widget.Toast.makeText($context$, "$text$", Toast.LENGTH_SHORT).show();

ViewConstructors

public $class$(android.content.Context context) {
    this(context, null);
}

public $class$(Context context, android.util.AttributeSet attrs) {
    this(context, attrs, 0);
}

public $class$(Context context, AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);
    $cursor$
}

visible

$VIEW$.setVisibility(View.VISIBLE);

wraplt

task wrapper(type: Wrapper) {
    gradleVersion = "$version$"
}
相關文章
相關標籤/搜索