Search in sources :

Example 61 with Intent

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);
}
Also used : Intent(android.content.Intent)

Example 62 with 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;
}
Also used : Intent(android.content.Intent)

Example 63 with 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);
}
Also used : Intent(android.content.Intent)

Example 64 with Intent

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);
        }
    });
}
Also used : TextView(android.widget.TextView) Intent(android.content.Intent) ImageView(android.widget.ImageView) TextView(android.widget.TextView) ImageView(android.widget.ImageView) View(android.view.View)

Example 65 with 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);
    }
}
Also used : Intent(android.content.Intent)

Aggregations

Intent (android.content.Intent)30598 PendingIntent (android.app.PendingIntent)4802 Test (org.junit.Test)2560 View (android.view.View)2527 Bundle (android.os.Bundle)2094 ComponentName (android.content.ComponentName)1706 TextView (android.widget.TextView)1660 Uri (android.net.Uri)1607 Context (android.content.Context)1506 ResolveInfo (android.content.pm.ResolveInfo)1397 PackageManager (android.content.pm.PackageManager)1125 ArrayList (java.util.ArrayList)1067 IntentFilter (android.content.IntentFilter)917 ImageView (android.widget.ImageView)904 ActivityNotFoundException (android.content.ActivityNotFoundException)859 File (java.io.File)823 RemoteException (android.os.RemoteException)786 DialogInterface (android.content.DialogInterface)752 IOException (java.io.IOException)742 SharedPreferences (android.content.SharedPreferences)665