Android Studio自带模板

const

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

fbc

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

foreach

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

gone

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

IntentView

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

key

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

newInstance

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

noInstance

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

rgS

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

rouiT

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$"
}

你可能感兴趣的:(android-studio,模板)