This file contains hidden or 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
Intent intent = new Intent(Intent.ACTION_PICK); | |
intent.setType("image/*"); | |
intent.setData(android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI); | |
startActivityForResult(intent, 0); |
This file contains hidden or 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 com.example.userinput; | |
import android.os.Bundle; | |
import android.app.Activity; | |
import android.util.Log; | |
import android.view.KeyEvent; | |
import android.view.MotionEvent; | |
public class UserInputActivity extends Activity { |
This file contains hidden or 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 com.example.lockscreen; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.view.View; | |
import android.view.View.OnClickListener; | |
import android.view.Window; | |
import android.view.WindowManager; | |
import android.widget.Button; | |
import android.widget.Toast; |
This file contains hidden or 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
public void onClick(View v) { | |
if (v.getId() == R.id.Button01) { // if you pressed the 'Button01' | |
finish(); // finish this Activity | |
} | |
} |
NewerOlder