how to connect two strings?
<TextView android:text="@string/app_name.@string/app_version" android:layout_height="wrap_content" android:layout_width="fill_parent" android:gravity="center" android:layout_alignParentLeft="true" android:id="@+id/Welcome" android:textSize="34px"></TextView>
android:text="@string/app_name.@string/app_version"
the emulator directly printed "@string/app_name.@string/app_version" instead of the string it supposed to be something like "APP 1.2"
you can't do that, if you want to use two strings in your TextView, you'd have to set the text programmatically:
TextView tv = (TextView)findViewById(R.id.welcome);
tv.setText(getString(R.string.app_name) + getString(R.string.app_version));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With