thank posted answer, looked on of them , seem work! sorry if didn't mark your's answer since mark one. methods below worked me. appreciated.
hi couple of things know:
i created new activity, simple. function press button on mainactivity page redirect user new page called display. seems working fine except 2 errors keep on getting. android:id="@+id/" , android:layout_below="@+id/" return missing resource names.
here 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:paddingleft="@dimen/activity_horizontal_margin" android:paddingright="@dimen/activity_horizontal_margin" android:paddingtop="@dimen/activity_vertical_margin" android:paddingbottom="@dimen/activity_vertical_margin" tools:context=".mainactivity"> <textview android:text="@string/welcome_screen" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/" android:layout_alignparenttop="true" android:layout_centerhorizontal="true" android:textstyle="bold" android:textsize="24sp" android:textcolor="#000000"/> <button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/g_button" android:id="@+id/g_button" android:layout_margintop="121dp" android:layout_below="@+id/" android:layout_centerhorizontal="true" android:clickable="true" android:onclick="onbuttonclick" /> </relativelayout> any appreciated.
you have give proper id textview below code
<textview android:text="@string/welcome_screen" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/mytext" android:layout_alignparenttop="true" android:layout_centerhorizontal="true" android:textstyle="bold" android:textsize="24sp" android:textcolor="#000000"/> <button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/g_button" android:id="@+id/g_button" android:layout_margintop="121dp" android:layout_below="@+id/mytext" android:layout_centerhorizontal="true" android:clickable="true" android:onclick="onbuttonclick" />
Comments
Post a Comment