• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

reloading a fragment layout??

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everybody

I have a fragment that checks my FirebaseDatabase for a curtain value... if the value is there, I want the button in my fragment start a new Activity to view the information, but if it is not there, Iwant the same button to start a new Activity to create the information...

Here is my code:



the only way I can think that it will work is if I update the fragment layout after I have gotten the datasnapshot... is there a way to do this??
 
Ben van Jaarsveld
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
... I think the best way to do it will be just to create a listview.... and when the datasnapshot is updated then only add the item to the listview...

all I have to do then is apply my button xml file to theBackground of the listitem...(or something)

in any case that is what I am going to try...
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic