• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

reloading a fragment layout??

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • 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: 48
  • Mark post as helpful
  • send pies
  • 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...
 
girl power ... turns out to be about a hundred watts. But they seriuosly don't like being connected to the grid. Tiny ad:
Enterprise-grade Excel API for Java
https://products.aspose.com/cells/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!