android - Making RelitiveLayouot view -


I'm new to Android so I spent hours trying to see it in the code like this . . Can anyone help on this? Enter image details here

This is my endeavor:

  Relative layout photo = new relative layout (this); photo.setLayoutParams (New Responsive Layout. LayoutPrices (Relative Layout Layout Parm. WRAP_CONTENT, Density Topics (80))); Photo.setGravity (Gravity.CENTER_VERTICAL); allphotos.addView (photo); TextView textView1 = new text view (this); textView1.setLayoutParams (new layout layout. layout (layout perm. WRAP_CONTENT, layout para. WRAP_CONTENT)); TextView1.setGravity (Gravity.CENTER_VERTICAL); textView1.setText ("IDasdfasdfasdfasdfasdfd"); photo.addView (textView1); Relational layout. Layout Parameters = New Relative Layout Layout side (relative layout layout.png. WRAP_CONTENT, relative layout. Layoutpam. WRAP_CONTENT); Params.addRule (relative layout. ALIGN_PARENT_LEFT, relative layout. TRUE); ImageView img = New ImageView (this); Img.setLayoutParams (newest layout layout layoutperms (layout perm. WRAP_CONTENT, layout para. WRAP_CONTENT)); Img.setLayoutParams (parameter); Photo.addView (img); ImageView del_img = New ImageView (this); Img.setLayoutParams (newest layout layout layoutperms (layout perm. WRAP_CONTENT, layout para. WRAP_CONTENT)); Img.setLayoutParams (parameter); photo.addView (del_img);    

Why do you do all this in code? Use Xml if you need to see XML view from xml use View.inflate , then it must pass its XML.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -