Search code examples
androidpictureboxbuttonclickpicturegallery

Onclick Image-Selection


I'd like to create a Button, on which i can tip, afterwards, there should show up a picture selection which should be scrollable (probably its a grindview idk). It's like the thing in whatsapp on the upper side right, exactly something like that I'd like to do.

How can I do this? What do I need for that in my Layoutfile, and is it possible to set the content of it, to my Database?

Here you see how it should look like.

I'd like to have something like that 2 but how can I create that. What do I need for it?

Thx In Advance


Solution

  • Hi safari in that case You need to take Linear layout with horizontal orientation. which having other two Lenear layout like this.

      <LinearLayout android:orientation="horizontal"  >
    
         <LinearLayout >
                <GridView > set images of smiley</GridView>
         </LinearLayout>
    
         <LinearLayout android:orientation="vertical" >
    
              <Button></Button>
              <Button></Button>
              <Button></Button>
              <Button></Button>
         </LinearLayout>
      </LinearLayout>   
    

    and then set visibility i.e gone and visible on require place

    it may help some what.