android - Pass data to multiple fragments -


I'm creating a scene with 2 pieces inside it, it's okay to increase layout but I got another problem. Before making the pieces, I need to pass some pieces in fragments (fragment list Sachema and Fragment schema datatel). I thought about the application variable, but I think it's not the proper way. How can I do this? Thanks in advance

Increase:

  increases public square laminate {@ Override Public View Creatives (LayoutInflator Inflator, View Group Container, Bundle Saved InstantState) {// TODO Auto-Generated Method View Stub View = inflater.inflate (R. Late Fragment_sema, Container); Return view; }}  

Layout:

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; LinearLayout xmlns: android = "http://schemas.android.com/apk/res/android" Android: layout_width = "match_parent" Android: layout_height = "match_parent" android: orientation = "horizontal" & gt; & Lt; Android: layout_width = "0dp" Android: layout_height = "match_parent" /> android: & Lt; Android: layout_wind = "0dp" Android: layout_height = "match_parent" / & gt; & Lt; / LinearLayout & gt;  

use piece setArguments To pass the data

  Fragment shimetel piece = new piece only (); Bundle bundle = new bundle (); Bundle.putString ("Data", "Your Data"); Fragment.setArguments (bundle);  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -