I have an audio player toolbar activity that has a corresponding layout file.
I need this player to show up at the bottom of another activity. I use a ViewStub and inflate the audio toolbar's lay开发者_StackOverflow社区out file in the stub.
How do I access the buttons, etc on this inflated view and how do I set their behavior?
The docs on ViewStub did not mention anything about this (or maybe I totally overlooked something).
I may be doing something fundamentally wrong here so I would appreciate any help I can get :)
Once you've inflated a view, you call findViewById on the view with the ID. e.g.
View v = ...;
TextView textView = (TextView) v.findViewById(R.id.textview);
if in your xml you had a declaration of a TextView with id "@+id/textview"
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论