ArhamTechMind

EditText and TextView

Working With EditText and TextView

activity_main.xml<?xml version=”1.0″ encoding=”utf-8″?><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”    tools:context=”com.example.desktop.workingwithedittextandtextview.MainActivity”>     <EditText        android:layout_width=”wrap_content”        android:layout_height=”wrap_content”        android:id=”@+id/editText”        android:layout_alignParentTop=”true”        android:layout_marginTop=”91dp”        android:layout_alignParentRight=”true”        android:layout_alignParentEnd=”true”        android:layout_alignParentLeft=”true”        android:layout_alignParentStart=”true”        android:hint=”Enter name” />     <Button        android:layout_width=”wrap_content”        android:layout_height=”wrap_content”        android:text=”Show Name”        android:id=”@+id/button”        android:layout_below=”@+id/editText”        android:layout_centerHorizontal=”true” />     <TextView        android:layout_width=”wrap_content”        android:layout_height=”wrap_content”        android:textAppearance=”?android:attr/textAppearanceMedium”        android:id=”@+id/textView_show_name”        android:layout_below=”@+id/button”        android:layout_alignLeft=”@+id/button”        android:layout_alignStart=”@+id/button”        android:layout_marginTop=”89dp”        android:layout_alignParentRight=”true”        android:layout_alignParentEnd=”true” /></RelativeLayout> MainActivity.java package com.example.desktop.workingwithedittextandtextview;import android.support.v7.app.AppCompatActivity;import android.os.Bundle;import android.view.View;import android.widget.Button;import …

Working With EditText and TextView Read More »