Android Programming The Big Nerd Ranch Guide by Bill Phillips, Chris Stewart, Kristin Marsicano (z-lib.org)

(gtxtreme123) #1

Chapter 16  Taking Pictures with Intents


Dedicating an entire row to a thumbnail and a button would make your app look clunky and
unprofessional. You do not want that, so you will arrange things nicely.


Add new views to fragment_crime.xml to build out this new area. Start with the lefthand side, adding
an ImageView for the picture and an ImageButton to take a picture (Figure 16.2).


Figure 16.2  Camera view layout (res/layout/fragment_crime.xml)


Then continue with the righthand side, moving your title TextView and EditText into a new
LinearLayout child to the LinearLayout you built in Figure 16.2 (Figure 16.3).

Free download pdf