2

I' m starting on android, i want to learn to do this:

To give the user the possibility to press a button and select a photo from the phone and show the image reduced to 100x100 pixels on a ImageView from my layout. If it is possible, the image haves to be 200 KB maximum

i'm searching at google but the info i am finding is too hard for me, and the examples are not the ones i am searching for

if someone can give me the code to do this will be great, my skills are not soo good

this is my layout:

<RelativeLayout
    android:gravity="center_vertical"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">
    <TextView
        android:id="@+id/profileImageLabel" 
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Profile Image:"
        android:layout_marginTop="13px"/>
    <ImageView
        android:id="@+id/profileImage"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBaseline="@id/profileImageLabel"
        android:layout_alignParentRight="true"
        android:maxWidth="90px"
        android:maxHeight="90px"/> 
</RelativeLayout>
Cristian
  • 198,401
  • 62
  • 356
  • 264
NullPointerException
  • 36,107
  • 79
  • 222
  • 382

1 Answers1

3

So, go step-by-step:

  1. How to pick an image from gallery (SD Card) for my app?
  2. Crop and resize an image in Android

my skills are not soo good

That's sad, but it's something that you should keep personal. No one cares if you are skilled or not; better you concentrate on improve your Googling and programming skills and that's it.

Community
  • 1
  • 1
Cristian
  • 198,401
  • 62
  • 356
  • 264