Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MainActivity extends Activity
- @Override
- protected void onCreate(Bundle savedInstanceState)
- {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- Button PrefrencesButtonb=(Button) findViewById(R.id.PrefrencesButton);
- PrefrencesButtonb.setOnClickListener(new View.OnClickListener()
- {
- @Override
- public void onClick(View v)
- {
- Intent ip = new Intent(getApplicationContext(),PrefrencesPage.class);
- startActivity(ip);
- }
- });
- public class PrefrencesPage extends MainActivity
- {
- protected void onCreate(Bundle savedInstanceState)
- {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.prefrences);
- Button PrefrencesBackButtonb=(Button) findViewById(R.id.PrefrencesBackButton);
- PrefrencesBackButtonb.setOnClickListener(new View.OnClickListener()
- {
- @Override
- public void onClick(View v)
- {
- finish();
- }
- });
- }
- <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"
- android:background="@drawable/sky_backgorund_day"
- tools:context="com.example.bio_balloon_initial_main_menu_no_andengine.MainActivity" >
- <Button
- android:id="@+id/PrefrencesButton"
- android:layout_width="200dp"
- android:layout_height="wrap_content"
- android:layout_alignLeft="@+id/HiScoreButton"
- android:layout_alignParentRight="true"
- android:layout_below="@+id/QuoteButton"
- android:layout_marginTop="20dp"
- android:text="Preferences"
- android:textColor="#ffffff" />
- </RelativeLayout>
- <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:background="@drawable/night_sky_backgorund"
- android:orientation="vertical" >
- <Button
- android:id="@+id/PrefrencesBackButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- android:layout_centerHorizontal="true"
- android:layout_marginBottom="30dp"
- android:background="@drawable/main_menu_style"
- android:text="Back"
- android:textColor="#ffffff" />
- </RelativeLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement