I know how to get an instance of fragment inside an activity from that activity.
but i don't know how to change properties of View objects like TextView,Button inside a fragment from activity.
anybody can help, please give an example for how to do that.
            Asked
            
        
        
            Active
            
        
            Viewed 143 times
        
    -3
            
            
         
    
    
        Goku
        
- 9,102
- 8
- 50
- 81
 
    
    
        SriDatta Yalla
        
- 766
- 8
- 13
- 
                    May be it's already [answered](https://stackoverflow.com/questions/24188050/how-to-access-fragments-child-views-inside-fragments-parent-activity) same like this. – Jayesh Rathod Nov 29 '17 at 12:47
1 Answers
0
            
            
        Just use findViewById() from your activity. Once the fragment is attached to the activity and its view is created all views are part of the view hierarchy ergo you can retrieve references to them from the activity
 
    
    
        Marco Pierucci
        
- 1,125
- 8
- 23
- 
                    I didn't understand what you have said please give me an example. – SriDatta Yalla Nov 29 '17 at 13:08