Textview is not showing anything

klavorus

New Member
My textview shows blank! Even when I put a String, it shows blank..Please tell me what to do\[code\]protected void OnCreate (Bundle savedInstanceState ) throws ClientProtocolException, IOException, JSONException{ super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); TextView result = (TextView) findViewById(R.id.text1); result.setText("TESTING");\[/code\]This is my xml\[code\]<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context=".MainActivity" > <TextView android:id="@+id/text1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/hello_world" /></RelativeLayout>\[/code\]
 
Back
Top