Skip to content

Instantly share code, notes, and snippets.

@hyoromo
Created November 20, 2009 05:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hyoromo/239301 to your computer and use it in GitHub Desktop.
Save hyoromo/239301 to your computer and use it in GitHub Desktop.
端末バージョンを取得
package jp.ne.hyoromo.android.VersionDemo;
import android.app.Activity;
import android.os.Build;
import android.os.Bundle;
import android.widget.TextView;
public class VersionDemo extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
TextView tv = (TextView) findViewById(R.id.hello);
tv.setText("hello, " + new Build.VERSION().SDK);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment