Android: Fragment overlay another fragment with semi transparent -


Assuming I have 2 pieces, one of these is the list view and the second is the loading text when I want to When I click on a list item, then the loading text fragment list appears at the top of the view. I have adjusted the opacity of loading text background: Android: background = "# 33FFFFFF" but it still shows the loading text on a solid brown background.

  & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; ListView xmlns: android = "http://schemas.android.com/apk/res/android" Android: Orientation = "Vertical" Android: layout_width = "match_parent" Android: layout_height = "match_parent" android: id = "@Android : Id / list "android: background =" # e8e9ee "Android: divider =" #ccc "Android: dividerHeight =" 1dp "/>   

piece containing a text view:

     

My Java code is basically something like: onItemClick:

  Fragment transaction transaction = manager.beginTransaction (); transaction.show (loadingFragment); transaction.commit (); < / Code>   

I did it and it completely Works, but instead of using:

Activity Layout: Android: Relative Layout Android: Android: Android: layout_width = "fill_parent" Android: layout_height = "Fill_parent" Android: Layout_marginRight = "5dp" Android: Layout_marginand = "5dp" & gt; & Lt; FrameLayout Android: Android: Android: layout_width = "fill_parent" Android: layout_height = "fill_parent" Android: layout_centralic = "true" Android: layout_centorhorient = "true" & gt; & Lt; / FrameLayout & gt; & Lt; FrameLayout Android: id = "@ + id / loading_text_fragment_container" Android: layout_width = "300dp" Android: layout_height = "300dp" Android: layout_centerHorizontal = "true" android: layout_centerVertical = "true" & gt; & Lt; / FrameLayout & gt; & Lt; / RelativeLayout & gt;

FragmentManager.beginTransaction (). Add (R.id.list_view_container, listViewFragment) .commit ();

then loading text:

  // Create a new piece in the layout of the activity Your alignment is your graphic = new your fragmentation (); // Add piece for the 'loading_text_fragment_container' framelayout section to the manger.binterrans dialog (). Add (Rd.loading_text_fragement_container, your fragment) .commit ();   

  @ override public view creatives (layoutEfterter Inflator, View Group container, bundle saved instanestate) {// for this piece refund Increasing layout Inflater.inflate (R.layout.your_fragment_layout, container, incorrect); }   

And your_fragment_layout.xml contains a common text view without any special feature.

Hope this will be useful,

is concerned!

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -