0

I have XML file where I display information using LinearLayout vertical. All what I need to do is to create horizontal LinearLayout and attach there an image and a TextView. Then I need to display this horizontal LinearLayout on my main vertical LinearLayout. How can I do this? I need to do this programmatically in java

Timur
  • 11
  • 2

1 Answers1

1

First create a LinearLayout with orientation = vertical then create another LinearLayout inside this with orientation = horizontal with your image and textview. Like this

<LinearLayout
android:orientation="vertical"
>
//Your other views
<LinearLayout
android:orientation="horizontal"
>
// Your image and textview
</LinearLayout>
</LinearLayout>
sajidjuneja
  • 184
  • 7