android - LayoutInflater doesnt work -
I am building a building like a chat app, so when I go into my current view, the elements (user pictures and messages) I want to add. The problem is in the show's message ceremony, notchings happen, but there is no error.
Here's my code:
Chat Activity - & gt; ShowMessage: Messages XML: Update Adding Content Content Review (Rally); Works, but, I want to attach it to "replace xml" with all the content, not everywhere. After you do the inflater you can use the method increasingly with the layout id as the parameter Want to add a layout for Where reference references to reference references relative layout ri = new relative layout (chatactivity.es); rly.setLayoutParams (new layoutprim (layout perm. WRAP_CONTENT, layout para. WRAP_CONTENT)); LayoutInflator Inflar = Match-Layout Inflator (); ViewToAppend = see inflater.inflate (R. layout. Message, blank); rly.addView (viewToAppend);
& lt; Android: layout_heid = "40 dp" Android: layout_linkpoint left = "true" android: layout_language = "true" android: src = "@ drauble / Feed "/> & Lt; Android: layout_height = "wrap_content" android: layout_centerVertical = "true" android: layout_marginLeft = "10dp" Android: layout_toRightOf = "@ + ID / ImageView1": TextView Android: id = "@ + id / textView1" Android: layout_width = "wrap_content" "android: text =" messagetext "/> & Lt; / RelativeLayout & gt;
see v = (LayoutInflater) reference. getSystemService (context.LAYOUT_INFLATER_SERVICE)) oscillation (R.layout.info_window_adapter_layout, tap);
Comments
Post a Comment