Hello friends, I want to zeptat.Vytvořil I have in my application scrollView where I have about 20 buttons
[b] <RelativeLayout xmlns:android=“http://schemas.android.com/apk/res/android”
android:layout_width=“match_parent”
android:layout_height=“match_parent”>
<LinearLayout
android:layout_width=“match_parent”
android:layout_height=“match_parent”
android:background="@drawable/aplikace4"
android:orientation=“vertical” >
<ScrollView
android:id="@+id/myScroll"
android:layout_width="fill_parent"
android:layout_height="423dp"
android:layout_marginTop="55dp" >
<LinearLayout
android:id="@+id/scrollLinear"
android:layout_width="fill_parent"
android:layout_height="2222dp"
android:orientation="vertical" >
<Button
android:id="@+id/btnAlkohol"
android:layout_width="fill_parent"
android:layout_height="60dp"
android:background="@drawable/carka"
android:onClick="OnButtonAlkohol"
android:text="@string/alkohol"
android:textSize="25sp" />
</LinearLayout>
</ScrollView>
</LinearLayout>
</RelativeLayout>[/b]
Here is just an excerpt, and there is only one .To do when I click on it so I opened a new Layout.Udělal I therefore new class where I want to control every one button. (Again, there is only one)
[b] public class VyberTemata extends Activity {
Button btnAlkohol;
public void OnButtonAlkohol (View v)
{
btnAlkohol=(Button)findViewById(R.id.btnAlkohol);
setContentView(R.layout.aplikace_slova);
}
}[/b]
Well, when I turn on the application and click on it nothing happens can anyone tell me what I’m doing wrong? At the same time when I use the same code in another command only is there a different layout so it works .does not work just the buttons in ScrollView.thanks for advice