investactivity.xml

<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" > <Button android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Button 55"/> </LinearLayout> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" > <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <Button android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Button 1" /> <TextView android:id="@+id/textView" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="24dp" android:text="TextView" /> <Button android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Button 11" /> </LinearLayout> </ScrollView> </LinearLayout> 

InvestActivity.java

 import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.TextView; public class InvestActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.investactivity); TextView textEl = (TextView) findViewById(R.id.textView); textEl.setText("23232323"); } } 

  • And the static text is displayed which you specify in the layout? Errors gives some? - Kirill Stoianov
  • static is displayed, there are no errors - kuzmich
  • It is very strange, and after you set the text in the code - does the static disappear or remain? - Kirill Stoianov
  • In general, I launched your code - everything works for me! - Kirill Stoianov

0