Working with Buttons in Android Studio
From the previous article we went through a basic introduction on Android Studio.This article help you to get to know about Buttons in android studio.Open up Android studio and start. Given below is the edited code of the text view that I have used. <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:text="Hello World!" android:textSize="36sp" android:id="@+id/textView" /> Go to your palette in the project. Then drag and place the button where you need in the content. Then move onto your text view. There you can see that the code for the button has been activated. There is an ID given to the button to identify a particular component which is always unique. You can give name to the button in android.text. Now give a background color to the button. Method 1 : Using inbuilt colors android: ba...
Comments
Post a Comment