android - How do I treat a layout as a view? -
I am creating a chat-ask app and it works fine with a single view, e.g. An image view, but how do I use a whole layout? I tried to add an ID to the layout, but not
I am trying to do something like this:
windowManager.addContentView (R.layout.popup, params);
You have to increase the layout. Like
layoutInflator inflater = (layoutfile) context.getSystemService (reference. LEOUT_INFLATER_SERVICE); See myLayoutView = inflater.inflate (R.Lite.my_LAYOUT_ID, empty, incorrect);
then
see = myLayoutView.findViewById (R.id.your_view_id);
Comments
Post a Comment