I need to concatenate two string and display with single text view. That string concatenate is working fine within Relative Layout. But i want to concatenate within Linear layout.
Here my code:
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/l1"
android:id="@+id/ll"
android:orientation="vertical"
>
<TextView
android:id="@+id/hubraum"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:text="Hubraum :"
android:textColor="#000"
android:textSize="12dp"
android:layout_gravity="left"
/>
</LinearLayout>
.java
String title = "Hubraum: ";
String value = bikeItemList.getHubraum();
String result = title + value;
txtCapacity.setText(result);
I tried the above type and following type also
txtCapacity.setText("Hubraum: " +","+ bikeItemList.getHubraum());
But it only display bikeItemList.getHubraum(). the "Hubraum:" is not display.
I tried with using append also but it display bikeItemList.getHubraum() this text only.
Any one can know the reason.