{"id":83647,"date":"2021-08-23T09:00:44","date_gmt":"2021-08-23T03:30:44","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=83647"},"modified":"2021-08-23T09:00:44","modified_gmt":"2021-08-23T03:30:44","slug":"android-edittext","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/android-edittext\/","title":{"rendered":"EditText for Android Developers"},"content":{"rendered":"<p>Taking input is an essential part of any application. Without inputs, the app is kind of less interactive. Whether you wish to log in as a user or sign him up or take his preferences, then inputs play a significant role. Now the question is, how can you take inputs in android? Android EditText is used to do this. This article will try to cover every aspect of EditText along with its attributes and implementation.<\/p>\n<h3>What is an EditText in Android?<\/h3>\n<p>EditText is an android UI element that allows the app developers to take input from the users. EditText is quite helpful in creating forms, sign up, log in, or other kinds of user interaction pages. The EditText has several attributes to style it and add some functionality to it. Later on, in this article, we will see most of the attributes in detail.<\/p>\n<p>Now let\u2019s see a sample code to create an EditText in your application.<\/p>\n<p><strong>XML Code for normal EditText:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;EditText\n            android:id=\"@+id\/normal_edit_text\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:inputType=\"textCapWords\"\n            \/&gt;\n<\/pre>\n<p><strong>XML Code for Material design based EditText:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;com.google.android.material.textfield.TextInputEditText\n            android:id=\"@+id\/full_name\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:inputType=\"textCapWords\"\n            \/&gt;\n<\/pre>\n<p><strong>Kotlin Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">full_name = findViewById(R.id.full_name)\n\nval name = full_name.text.toString()\n<\/pre>\n<h3>Android EditText Attributes<\/h3>\n<p>EditText, like every other UI element, has its own set of characteristics. Attributes are nothing but properties that can be applied to the UI element to style it and add more functionalities.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/07\/Android-EditText-Attributes.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-83780\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/07\/Android-EditText-Attributes.jpg\" alt=\"Android EditText Attributes\" width=\"1505\" height=\"502\" \/><\/a><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Attribute Name<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<td><b>Example<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">id<\/span><\/td>\n<td><span style=\"font-weight: 400\">The \u201cid\u201d attribute is used to identify the EditText uniquely.\u00a0<\/span><\/td>\n<td><span style=\"font-weight: 400\">android:id= \u201c@+id\/your_unique_id\u201d<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">gravity<\/span><\/td>\n<td><span style=\"font-weight: 400\">The \u201cgravity\u201d attribute is used to choose the alignment of the content present inside the EditText.\u00a0<\/span><\/td>\n<td><span style=\"font-weight: 400\">android: gravity= \u201ccenter\u201d<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">textColor<\/span><\/td>\n<td><span style=\"font-weight: 400\">The \u201ctextColor\u201d attribute is used to set the color to text present inside the edit text.\u00a0<\/span><\/td>\n<td><span style=\"font-weight: 400\">android:textColor= \u201c#dddddd\u201d<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">hint<\/span><\/td>\n<td><span style=\"font-weight: 400\">The \u201chint\u201d attribute is like a placeholder for the edit text.\u00a0<\/span><\/td>\n<td><span style=\"font-weight: 400\">android: hint= \u201cEnter the phone number here\u201d<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">textColorHint<\/span><\/td>\n<td><span style=\"font-weight: 400\">The \u201ctextColorHint\u201d is used to provide a color to the hint text.\u00a0<\/span><\/td>\n<td><span style=\"font-weight: 400\">android:textColorHint= \u201c#454545\u201d<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">text<\/span><\/td>\n<td><span style=\"font-weight: 400\">The \u201ctext\u201d attribute is used to set the content in the EditText element.\u00a0<\/span><\/td>\n<td><span style=\"font-weight: 400\">android:text= \u201cMy Name is Falcon\u201d<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">textSize<\/span><\/td>\n<td><span style=\"font-weight: 400\">The \u201ctextSize\u201d attribute is used to set the size of text content.\u00a0<\/span><\/td>\n<td><span style=\"font-weight: 400\">android:textSize= \u201c27sp\u201d<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">textStyle<\/span><\/td>\n<td><span style=\"font-weight: 400\">The \u201ctextStyle\u201d attribute is used to style the text present in the EditText.\u00a0<\/span><\/td>\n<td><span style=\"font-weight: 400\">android:textStyle= \u201cbold\u201d<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">background<\/span><\/td>\n<td><span style=\"font-weight: 400\">The backdrop of the EditText is controlled by the &#8220;background&#8221; attribute.<\/span><\/td>\n<td><span style=\"font-weight: 400\">android:background= \u201c#d5d5d5\u201d<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Attributes inherited from TextView Class<\/strong><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/07\/Attributes-inherited-from-TextView-Class.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-83781\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/07\/Attributes-inherited-from-TextView-Class.jpg\" alt=\"Attributes inherited from TextView Class\" width=\"960\" height=\"679\" \/><\/a><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Attribute Name<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">android:autoText<\/span><\/td>\n<td><span style=\"font-weight: 400\">The \u201cautoText\u201d attribute is used to automatically correct and suggest the complete sentence to the user.\u00a0<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">android:drawableRight<\/span><\/td>\n<td><span style=\"font-weight: 400\">The \u201cdrawableRight\u201d is used to add an icon or a drawable asset at the extreme right of your EditText.\u00a0<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">android:drawableLeft<\/span><\/td>\n<td><span style=\"font-weight: 400\">The \u201cdrawableLeft\u201d is used to add an icon or a drawable asset at the extreme left of your EditText.\u00a0<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">android:text<\/span><\/td>\n<td><span style=\"font-weight: 400\">The \u201ctext\u201d attribute is used to set the content in the EditText element.\u00a0<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">android:editable<\/span><\/td>\n<td><span style=\"font-weight: 400\">The \u201ceditable\u201d attribute is used to make a view editable.\u00a0<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Attributes inherited from View Class<\/strong><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/07\/Attributes-inherited-from-View-Class.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-83782\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/07\/Attributes-inherited-from-View-Class.jpg\" alt=\"Attributes inherited from View Class\" width=\"730\" height=\"656\" \/><\/a><\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Attribute Name<\/b><\/td>\n<td><b>Description<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">android:contentDescription<\/span><\/td>\n<td><span style=\"font-weight: 400\">The \u201ccontentDescription\u201d is used to describe the view briefly.\u00a0<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">android: onClick<\/span><\/td>\n<td><span style=\"font-weight: 400\">The \u201conClick\u201d attribute is used to add a click event on the view.\u00a0<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">android: visibility<\/span><\/td>\n<td><span style=\"font-weight: 400\">The \u201cvisibility\u201d attribute is used to hide or show the element in the user interface.\u00a0<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Implementation of Android EditText<\/h3>\n<p>I hope you now understand what EditText is and develop a small application using the above concepts. So, for the implementation, we will try to establish a straightforward sign-up application that will allow the users to enter their personal information and then register in your application.<\/p>\n<p>To build the sign-up application, you need to follow the below steps nicely.<\/p>\n<p><strong>1:<\/strong> Open your Android Studio in your system and then click on create a new project.<\/p>\n<p><strong>2:<\/strong> Select Empty Activity to functionalities, and then provide a name for your application. In my case, it is \u201ctechVidvanSignUp.\u201d Now select the Android Lollipop(API level 22) and then click on finish.<\/p>\n<p><strong>3:<\/strong> Let the files load, open your activity_main.xml file, and add the below code in the XML file.<\/p>\n<p><strong>Code: activity_main.xml<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\n&lt;LinearLayout\n    xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"\n    xmlns:app=\"http:\/\/schemas.android.com\/apk\/res-auto\"\n    xmlns:tools=\"http:\/\/schemas.android.com\/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:orientation=\"vertical\"\n    tools:context=\".MainActivity\"&gt;\n\n    &lt;TextView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"Tech Vidvan Sign Up\"\n        android:gravity=\"center\"\n        android:layout_marginTop=\"20dp\"\n        android:textSize=\"30sp\"\n        android:textColor=\"#3F51B5\"\n        android:layout_marginBottom=\"40dp\"\n        android:textStyle=\"bold\"\n        \/&gt;\n\n    &lt;com.google.android.material.textfield.TextInputLayout\n        android:layout_marginTop=\"10dp\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:hint=\"Enter your full name\"\n        app:endIconMode=\"clear_text\"\n        style=\"@style\/Widget.MaterialComponents.TextInputLayout.OutlinedBox\"\n        android:padding=\"10dp\"&gt;\n\n        &lt;com.google.android.material.textfield.TextInputEditText\n            android:id=\"@+id\/full_name\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:inputType=\"textCapWords\"\n            \/&gt;\n\n    &lt;\/com.google.android.material.textfield.TextInputLayout&gt;\n\n    &lt;com.google.android.material.textfield.TextInputLayout\n        android:layout_marginTop=\"5dp\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        app:endIconMode=\"custom\"\n        app:endIconDrawable=\"@drawable\/check_circle_outline_24\"\n        android:hint=\"Enter your phone number\"\n        style=\"@style\/Widget.MaterialComponents.TextInputLayout.OutlinedBox\"\n        android:padding=\"10dp\"&gt;\n\n        &lt;com.google.android.material.textfield.TextInputEditText\n            android:id=\"@+id\/phone_number\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:inputType=\"phone\"\n            \/&gt;\n\n    &lt;\/com.google.android.material.textfield.TextInputLayout&gt;\n\n    &lt;com.google.android.material.textfield.TextInputLayout\n        android:layout_marginTop=\"5dp\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:hint=\"Enter your email\"\n        app:endIconMode=\"custom\"\n        app:endIconDrawable=\"@drawable\/check_circle_outline_24\"\n        style=\"@style\/Widget.MaterialComponents.TextInputLayout.OutlinedBox\"\n        android:padding=\"10dp\"&gt;\n\n        &lt;com.google.android.material.textfield.TextInputEditText\n            android:id=\"@+id\/email\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:inputType=\"textEmailAddress\"\n            \/&gt;\n\n    &lt;\/com.google.android.material.textfield.TextInputLayout&gt;\n\n    &lt;com.google.android.material.textfield.TextInputLayout\n        android:layout_marginTop=\"5dp\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:hint=\"Enter your password\"\n        app:endIconMode=\"password_toggle\"\n        style=\"@style\/Widget.MaterialComponents.TextInputLayout.OutlinedBox\"\n        android:padding=\"10dp\"&gt;\n\n        &lt;com.google.android.material.textfield.TextInputEditText\n            android:id=\"@+id\/password\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:inputType=\"textPassword\"\n            \/&gt;\n\n    &lt;\/com.google.android.material.textfield.TextInputLayout&gt;\n\n\n    &lt;Button\n        android:onClick=\"registerMyself\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_gravity=\"center\"\n        android:layout_marginTop=\"40dp\"\n        android:text=\"Sign Up\"\n        android:backgroundTint=\"#4CAF50\"\n        android:textStyle=\"bold\"\n        android:padding=\"18dp\"\/&gt;\n\n&lt;\/LinearLayout&gt;\n<\/pre>\n<p><strong>4:<\/strong> Now, you need to handle the inputs from your MainActivity.kt file simply. For that, you can use the below code and take the information given by the user.<\/p>\n<p><strong>Code: MainActivity.kt<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">package com.techvidvan.techvidvansignup\n\nimport androidx.appcompat.app.AppCompatActivity\nimport android.os.Bundle\nimport android.view.View\nimport android.widget.EditText\nimport android.widget.Toast\n\nclass MainActivity : AppCompatActivity()\n{\n    \/\/declaring variables\n    lateinit var full_name:EditText\n    lateinit var phone:EditText\n    lateinit var email:EditText\n    lateinit var password:EditText\n\n    override fun onCreate(savedInstanceState: Bundle?)\n    {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.activity_main)\n\n        \/\/binding the edit text views with our created variables\n        full_name = findViewById(R.id.full_name)\n        phone = findViewById(R.id.phone_number)\n        email = findViewById(R.id.email)\n        password = findViewById(R.id.password)\n\n    }\n\n    fun registerMyself(view: View)\n    {\n        \/\/it is triggered when the user presses the sign up button\n\n        \/\/fetching the values entered by the user\n        \/\/and storing it in some strings\n\n        val name = full_name.text.toString()\n        val phone_number = phone.text.toString()\n        val email_address = email.text.toString()\n        val user_pass = password.text.toString()\n\n        \/\/now you apply some checks over this value\n        \/\/like phone number should be exactly 10 digits and all\n        \/\/for now we will simply display the details of the user in Toast\n\n        val msg = \"Name : $name, Phone : $phone_number, Email : $email_address, Password : $user_pass\"\n\n        \/\/displaying the toast message\n        Toast.makeText(this@MainActivity, \"Registration Successful \\n$msg\", Toast.LENGTH_LONG).show()\n\n    }\n}\n<\/pre>\n<p>After following the above, you need to run your application on your device or your emulator simply.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/07\/App_Output_1-7.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-83785\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/07\/App_Output_1-7.jpg\" alt=\"Android edittext\" width=\"1080\" height=\"2280\" \/><\/a><\/p>\n<p>So now, you can see the Sign-Up Screen. On this screen, you need to add your details. After you have entered your details, then you need to click on the sign-up button.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/07\/App_Output_2-7.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-83786\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/07\/App_Output_2-7.jpg\" alt=\"Android app\" width=\"1080\" height=\"2280\" \/><\/a><\/p>\n<p>If all your entered details are corrected, the app shows you the toast that your registration is successful.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/07\/App_Output_3-7.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-83787\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/07\/App_Output_3-7.jpg\" alt=\"Android edittext output\" width=\"1080\" height=\"2280\" \/><\/a><\/p>\n<h3>Summary<\/h3>\n<p>So through this article, you came across several use cases where EditText is useful. You saw how EditText makes your app more interactive to the user. You even went across the way you can integrate EditText in your application. Later on, you saw the various attributes present in the Android EditText.<\/p>\n<p>Finally, you saw an implementation of the Android EditText with a simple sign-up application. I hope you enjoyed the article and will go ahead and develop more such awesome apps.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Taking input is an essential part of any application. Without inputs, the app is kind of less interactive. Whether you wish to log in as a user or sign him up or take his&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":83779,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2791],"tags":[4084,4085,4086,4087],"class_list":["post-83647","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-android","tag-android-edittext-attributes","tag-android-edittext-implementation","tag-edittext","tag-edittext-in-android"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>EditText for Android Developers - TechVidvan<\/title>\n<meta name=\"description\" content=\"EditText is an android UI element that allows the app developers to take input from the users. See its attributes, uses and implementation.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/techvidvan.com\/tutorials\/android-edittext\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"EditText for Android Developers - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"EditText is an android UI element that allows the app developers to take input from the users. See its attributes, uses and implementation.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/android-edittext\/\" \/>\n<meta property=\"og:site_name\" content=\"TechVidvan\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/TechVidvan\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-08-23T03:30:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/07\/Android-EditText.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"TechVidvan Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:site\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TechVidvan Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"EditText for Android Developers - TechVidvan","description":"EditText is an android UI element that allows the app developers to take input from the users. See its attributes, uses and implementation.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/techvidvan.com\/tutorials\/android-edittext\/","og_locale":"en_US","og_type":"article","og_title":"EditText for Android Developers - TechVidvan","og_description":"EditText is an android UI element that allows the app developers to take input from the users. See its attributes, uses and implementation.","og_url":"https:\/\/techvidvan.com\/tutorials\/android-edittext\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2021-08-23T03:30:44+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/07\/Android-EditText.jpg","type":"image\/jpeg"}],"author":"TechVidvan Team","twitter_card":"summary_large_image","twitter_creator":"@vidvantech","twitter_site":"@vidvantech","twitter_misc":{"Written by":"TechVidvan Team","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techvidvan.com\/tutorials\/android-edittext\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/android-edittext\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22"},"headline":"EditText for Android Developers","datePublished":"2021-08-23T03:30:44+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/android-edittext\/"},"wordCount":835,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/android-edittext\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/07\/Android-EditText.jpg","keywords":["Android EditText Attributes","Android Edittext Implementation","EditText","EditText in Android"],"articleSection":["Android Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/android-edittext\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/android-edittext\/","url":"https:\/\/techvidvan.com\/tutorials\/android-edittext\/","name":"EditText for Android Developers - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/android-edittext\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/android-edittext\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/07\/Android-EditText.jpg","datePublished":"2021-08-23T03:30:44+00:00","description":"EditText is an android UI element that allows the app developers to take input from the users. See its attributes, uses and implementation.","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/android-edittext\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/android-edittext\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/android-edittext\/#primaryimage","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/07\/Android-EditText.jpg","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/07\/Android-EditText.jpg","width":1200,"height":628,"caption":"Android EditText"},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/android-edittext\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"EditText for Android Developers"}]},{"@type":"WebSite","@id":"https:\/\/techvidvan.com\/tutorials\/#website","url":"https:\/\/techvidvan.com\/tutorials\/","name":"TechVidvan Blogs","description":"","publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/techvidvan.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/techvidvan.com\/tutorials\/#organization","name":"TechVidvan","url":"https:\/\/techvidvan.com\/tutorials\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","width":200,"height":50,"caption":"TechVidvan"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/TechVidvan\/","https:\/\/x.com\/vidvantech"]},{"@type":"Person","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22","name":"TechVidvan Team","description":"The TechVidvan Team delivers practical, beginner-friendly tutorials on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our experts are here to help you upskill and excel in today\u2019s tech industry."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/83647","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/comments?post=83647"}],"version-history":[{"count":0,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/83647\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media\/83779"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=83647"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=83647"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=83647"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}