I've created an app using the Master/Detail template, but instead of a list on the master view, I want to add other elements (in fact replace the list with a different layout and add the initial list in this layout)
How to acheive this?
The top layout contains a list fragment on the left for the master, and framelayout on the right that will contains the detail fragment...
Is it possible to replace the master list fragment with a view that will contains the fragment?
I've created a specific layout (left_layout), that is referenced in the fragment xml, and changed my class inheritence to inherit from fragment and not list fragment, and I have the following exceptio when the application try to instanciate this fragment:
lang.RuntimeException: Unable to start activity ComponentInfo{com.digiwiz.tvtweet/com.digiwiz.tvtweet.ChannelListActivity}: android.view.InflateException: Binary XML file line #1: Error inflating class fragment
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325)
which is called from:
setContentView(R.layout.activity_channel_list);
and activity_channel_list is the master activity that has been modified:
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/channel_list"
android:name="com.digiwiz.tvtweet.ChannelListFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
tools:context=".ChannelListActivity"
tools:layout="@layout/left_layout" />