어플목록에 뜨워서 체크한값만 다음액티비티로 넘기려고 하는데어떻게해야하나요 ㅠㅠ
view = findViewById(R.id.Layout);
results = new ArrayList();
PackageManager pm = this.getPackageManager();
Intent intent = new Intent(Intent.ACTION_MAIN, null);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
list = pm.queryIntentActivities(intent,
PackageManager.PERMISSION_GRANTED);
for (ResolveInfo resolveInfo : list) {
str = resolveInfo.activityInfo.applicationInfo.loadLabel(pm).toString()
+ "\n";
results.add(resolveInfo.activityInfo.applicationInfo.loadLabel(pm)
.toString());
Log.w("Installed Applications", resolveInfo.activityInfo.applicationInfo
.loadLabel(pm).toString());
icon = resolveInfo.activityInfo.applicationInfo.loadIcon(pm);
holdlayout = new LinearLayout(getApplicationContext());
holdlayout.setOrientation(LinearLayout.HORIZONTAL);
checkBox = new CheckBox(getApplicationContext());
data = new TextView(getApplicationContext());
data.setText(str);
image = new ImageView(getApplicationContext());
image.setBackgroundDrawable(icon);
image.setLayoutParams(new ScrollView.LayoutParams(150, 150));
((ViewGroup) holdlayout).addView(checkBox);
((ViewGroup) holdlayout).addView(image);
((ViewGroup) holdlayout).addView(data);
((ViewGroup) view).addView(holdlayout);
button = (Button)findViewById(R.id.Button);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(abcdefg.this,abcdefg2.class);
startActivity(intent);
}
});
}
}