Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.bc67.myapplication;
- import android.support.v7.app.ActionBarActivity;
- import android.os.Bundle;
- import android.view.Menu;
- import android.view.MenuItem;
- import android.view.View;
- import android.widget.Button;
- public void selfchange(View view) {
- }
- Button button_test = (Button)findViewById(R.id.button1);
- button_test.setText("Click Me !");
- }
- <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">
- <Button
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="New a Button"
- android:id="@+id/button1"
- android:layout_centerVertical="true"
- android:layout_centerHorizontal="true"
- android:clickable="true"
- android:onClick="selfchange"/>
- </RelativeLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement