use of android.content.Intent in project TakePhoto by crazycodeboy.
the class SimpleFragment method showImg.
private void showImg(ArrayList<TImage> images) {
Intent intent = new Intent(getContext(), ResultActivity.class);
intent.putExtra("images", images);
startActivity(intent);
}
use of android.content.Intent in project TakePhoto by crazycodeboy.
the class IntentUtils method getCaptureIntent.
/**
* 获取拍照的Intent
* @return
*/
public static Intent getCaptureIntent(Uri outPutUri) {
Intent intent = new Intent();
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
//设置Action为拍照
intent.setAction(MediaStore.ACTION_IMAGE_CAPTURE);
//将拍取的照片保存到指定URI
intent.putExtra(MediaStore.EXTRA_OUTPUT, outPutUri);
return intent;
}
use of android.content.Intent in project UltimateAndroid by cymcsg.
the class ReloadIntentService method onHandleIntent.
public void onHandleIntent(Intent intent) {
try {
Thread.sleep(3000);
} catch (final InterruptedException e) {
Log.d(getClass().getCanonicalName(), e.toString());
}
Intent resultIntent = new Intent(ProgressMenuItemActivity.RELOAD_FILTER);
LocalBroadcastManager.getInstance(this).sendBroadcast(resultIntent);
}
use of android.content.Intent in project UltimateAndroid by cymcsg.
the class ParallaxSwipeBackNextActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
this.overridePendingTransition(R.anim.slide_right_in, R.anim.slide_right_out);
super.onCreate(savedInstanceState);
setContentView(R.layout.parallax_swipe_back_activity_next);
index = getIntent().getIntExtra("index", 0);
ImageView imageView = (ImageView) findViewById(R.id.image);
imageView.setImageResource(images[index]);
TextView textView = (TextView) findViewById(R.id.next);
textView.setText(textView.getText().toString() + index);
final Intent intent = new Intent(this, ParallaxSwipeBackNextActivity.class);
intent.putExtra("index", ++index);
if (index == images.length) {
textView.setText("FINISH ACTIVITY");
}
textView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (index == images.length) {
finish();
ParallaxSwipeBackNextActivity.this.overridePendingTransition(R.anim.slide_right_in, R.anim.slide_right_out);
} else
startParallaxSwipeBackActivty(ParallaxSwipeBackNextActivity.this, intent);
}
});
}
use of android.content.Intent in project UltimateAndroid by cymcsg.
the class ProgressMenuItemActivity method onOptionsItemSelected.
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch(item.getItemId()) {
case R.id.action_refresh:
Intent reloadService = new Intent(this, ReloadIntentService.class);
reloadReceiver.startProgress();
this.startService(reloadService);
return true;
case R.id.howToUse:
BasicUtils.sendIntent(this, HowToUseActivity.class, "data", "ProgressMenuItemActivity");
return true;
default:
return super.onOptionsItemSelected(item);
}
}
Aggregations