I have 3 views, 2 TextViews and 1 ImageView. I want the views to be aligned one after another like below :-
Here the "+" sign is an ImageView and "Another Text" is the second TextView.
I tried using a LinearLayout with horizontal orientation. Also RelativeLayout , but the First TextView shows but the next ImageView and the TextView do not show.
<android.support.v7.widget.LinearLayoutCompat
style="@style/style_ww"
android:orientation="horizontal">
<android.support.v7.widget.AppCompatTextView
android:id="@+id/txtusername"
style="@style/style_ww"
android:text="jjjkcrhwkjehrckwjherkjwherckjwhekrcjwernwjkrncwjknrkwjncwjrnwkjcnkwjnrckwjnrkwjnrkwjcncrkjwnrkjcwnrnwkrcnkwnrkwnrckwjnrkwjncrknwkrjnckwnrkwjnrkcwnrkwnckjnrkwnrkwnrckwnrkwnrckwrn"
android:textColor="@color/colorBlueGrey400"
android:textSize="@dimen/size_fourteen"
app:fontFamily="@font/roboto"/>
<android.support.v7.widget.AppCompatImageView
android:id="@+id/plus"
android:layout_width="@dimen/value_2"
android:layout_height="@dimen/value_2"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/value_5"
android:layout_marginTop="@dimen/value_1"
android:src="@drawable/ic_plus"/>
<android.support.v7.widget.AppCompatTextView
android:id="@+id/tvcomment"
style="@style/style_ww"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/value_5"
android:layout_marginRight="@dimen/value_20"
android:text="@string/comment"
android:textColor="@color/colorBlueGrey400"
app:fontFamily="@font/roboto"/>
</android.support.v7.widget.LinearLayoutCompat>
style/style_ww
<style name="style_ww">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
</style>
How can I achieve this? Any help is appreciated