I have a Gridview filled with images, when you click in one of those images it starts a detais activity.
It's all working fine, but now I want to make a Master-Detail layout. So I created that "layout-land" folder and instead of only a gridview, it was this:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/background"
tools:context=".MainActivityFragment">
<GridView
android:id="@+id/main_grid"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:numColumns="auto_fit" />
<fragment
android:id="@+id/fragment"
android:name="com.example.lucas.popularmovies.DetailActivityFragment"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
tools:layout="@layout/fragment_detail" />
</LinearLayout>
Before that, I was passing the Details' data as an Extra of the intent and retrieving it in the Fragment.
But when I'm displaying it all in the same screen, how do I pass the data in a way that will update the Details when I click in an image without starting a new activity? Thanks.