July 2015
Beginner to intermediate
600 pages
18h 59m
English
You will browse to this URL first by using your old friend the implicit intent. This intent will start up the browser with your photo URL.
The first step is to make your app listen to presses on an item in the RecyclerView. Update PhotoGalleryFragment’s PhotoHolder to implement a click listener that will fire an implicit intent.
Listing 28.3 Firing implicit intent when item is pressed (PhotoGalleryFragment.java)
public class PhotoGalleryFragment extends VisibleFragment {
...
private class PhotoHolder extends RecyclerView.ViewHolder
implements View.OnClickListener {
private ImageView mItemImageView;
private GalleryItem mGalleryItem; public PhotoHolder(View itemView) { super(itemView); mItemImageView ...Read now
Unlock full access