This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Activity sample | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.main); | |
TestAdapter adapter = new TestAdapter(getApplicationContext(), createBindDataList()); | |
ListView listView = (ListView) findViewById(R.id.listview); | |
listView.setAdapter(adapter); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="test.asynctask" | |
android:versionCode="1" | |
android:versionName="1.0" > | |
<uses-sdk android:minSdkVersion="12" /> | |
<application | |
android:icon="@drawable/ic_launcher" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// android.os.AsyncTask 抜粋 | |
// Executor | |
private static final ThreadPoolExecutor sExecutor = new ThreadPoolExecutor(CORE_POOL_SIZE, | |
MAXIMUM_POOL_SIZE, KEEP_ALIVE, TimeUnit.SECONDS, sWorkQueue, sThreadFactory); | |
// execute | |
public final AsyncTask<Params, Progress, Result> execute(Params... params) { | |
// 抜粋 | |
sExecutor.execute(mFuture); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package test.handler; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.os.Handler; | |
import android.os.HandlerThread; | |
import android.view.View; | |
import android.view.View.OnClickListener; | |
public class MainActivity extends Activity { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package test.fragment; | |
import android.app.Activity; | |
import android.app.Fragment; | |
import android.app.FragmentTransaction; | |
import android.os.Bundle; | |
import android.view.View; | |
import android.view.View.OnClickListener; | |
public class MainActivity extends Activity { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package test.fragment.asynctask; | |
import test.fragment.R; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.util.Log; | |
import android.view.View; | |
import android.view.View.OnClickListener; | |
public class MainActivity extends Activity { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package test.fragment.list; | |
import android.app.Activity; | |
import android.app.Fragment; | |
import android.app.FragmentTransaction; | |
import android.os.Bundle; | |
public class ListTestActivity extends Activity { | |
private static final String TAG_LIST = "list"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package test.fragment.configchange; | |
import android.app.Activity; | |
import android.app.Fragment; | |
import android.app.FragmentTransaction; | |
import android.os.Bundle; | |
/** | |
* 縦横切替で ListView/GridView を切り替えるサンプル | |
* (表示用データは毎回再生成しない) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package test.fragment.list; | |
import test.fragment.list.ImageFactory.Type; | |
import android.content.Context; | |
import android.graphics.Bitmap; | |
import android.graphics.Canvas; | |
import android.graphics.drawable.BitmapDrawable; | |
import android.util.AttributeSet; | |
import android.widget.ImageView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="test.nfc" | |
android:versionCode="1" | |
android:versionName="1.0" > | |
<uses-permission android:name="android.permission.NFC" /> | |
<uses-sdk | |
android:minSdkVersion="10" | |
android:targetSdkVersion="15" /> |
OlderNewer