Working with arrays of android fragments -


i'm trying dissect , work bit example of android fragments. excuse me posting links, code bit , i'm not sure should post here.

http://pastebin.com/xkul0rvz

http://pastebin.com/xw6v2xmg

the layout pretty straight-forward :

<linearlayout xmlns:android="http://schemas.android.com/apk/res/android"     android:orientation="horizontal"     android:layout_width="match_parent" android:layout_height="match_parent">      <fragment class="conti.fragments.fragmentlayout$titlesfragment"             android:id="@+id/titles" android:layout_weight="1"             android:layout_width="0px" android:layout_height="match_parent" />      <framelayout android:id="@+id/details" android:layout_weight="1"             android:layout_width="0px" android:layout_height="match_parent"             android:background="?android:attr/detailselementbackground" />  </linearlayout> 

as far can understand, list of strings first array displayed on left, when press on one, displays corresponding order text on right. how can add menu item different display corresponding text on right? if wanted define own layout new fragment, need modify layout file or create new one? or have create programatically in code? i'm bit confused.

create , inflate own layout @ oncreateview

@override public view oncreateview(layoutinflater inflater, viewgroup container,          bundle savedinstancestate) {     view view = inflater.inflate(r.layout.your_layout, container, false);       return view; } 

Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -