Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

get bimap by uri in android

protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

  if (requestCode == PICK_IMAGE_REQUEST && resultCode == RESULT_OK && data != null && data.getData() != null) {
                Uri filePath = data.getData();

     try { //Getting the Bitmap from Gallery
           Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), filePath);
           rbitmap = getResizedBitmap(bitmap, 250);//Setting the Bitmap to ImageView
           serImage = getStringImage(rbitmap);
           imageViewUserImage.setImageBitmap(rbitmap);
      } catch (IOException e) {
           e.printStackTrace();
      }


   }
}
Comment

PREVIOUS NEXT
Code Example
Java :: infinite loop in java 
Java :: code converter python to java 
Java :: Buscando Objeto do Array 
Java :: laravel Please update to at least Node v12.14 
Java :: validate data type in request body spring validation 
Java :: += operator casting in java 
Java :: save ArrayList into Room Database android studio 
Java :: quitar letras repetidas de una palabra en java 
Java :: navigation view item selected 
Java :: how to make edittext not editable in android studio 
Java :: Janaaa_Sa 
Java :: witch dependency is needed for "ArraysUtils" for the Import? 
Java :: android autocompletetextview hashmap 
Java :: java decrypt CryptoJS 
Java :: arraylist how to add at 0 java 
Java :: Which one of the following values can a Java variable NOT have? 
Java :: concurrentskiplistset infinite loop in jdk 
Java :: try catch still prints java 
Java :: The larger and the smaller of the character “E” and the integer 71 java 
Java :: java program for calendar using applet 
Java :: java.lang.IllegalMonitorStateException: object not locked by thread before wait() 
Java :: What is sleep() method 
Java :: differance entre appel implcite et explicite en java 
Java :: Java object of the file 
Java :: Duplicate class com.google.android.gms.internal.firebase_messaging.zzo found in modules jetified-firebase-iid 
Java :: identifier in java 
Java :: multiple string java 
Java :: how to draw a circle in java swing 
Java :: a ^ b java 
Java :: java 8 stream add to list 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =