{"id":1984,"date":"2016-06-06T05:22:26","date_gmt":"2016-06-06T05:22:26","guid":{"rendered":"http:\/\/abhiandroid.com\/ui\/?p=1984"},"modified":"2019-06-14T11:11:13","modified_gmt":"2019-06-14T11:11:13","slug":"linear-layout-inside-scrollview","status":"publish","type":"post","link":"https:\/\/abhiandroid.com\/ui\/linear-layout-inside-scrollview.html","title":{"rendered":"Linear Layout Inside ScrollView Example In Android Studio"},"content":{"rendered":"<p>Here in this\u00a0example of Linear Layout inside ScrollView we create a custom layout for user registration form using different views(TextView, EditText etc). After creating different views we enclose them inside\u00a0Linear Layout and then we enclose the whole layout in ScrollView to make all the element or views scrollable. In this registration form we display different fields with one Button named \u201cSubmit\u201d to submit the data of the user. Whenever a user clicks on Submit Button, we check all the fields are filled or not if filled we display a Successful message by using a Toast.<\/p>\n<p>Below you can download code, see final output and step by step explanation of example:<\/p>\n<p style=\"text-align: center;\"><a class=\"download\" href=\"http:\/\/www.mediafire.com\/file\/fctw3w55t42i138\/LinearLayoutInsideScrollView.zip\/file\" target=\"_blank\" rel=\"nofollow\">Download Code<\/a><a class=\"help\" title=\"Learn How To Download Code And Import In Android Studio\" href=\"\/androidstudio\/download-code-abhiandroid\" target=\"_blank\" rel=\"nofollow\"> ?<\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2013\" src=\"\/ui\/wp-content\/uploads\/2016\/05\/Linear-Layout-Inside-ScrollView-Example-Android.gif\" alt=\"Linear Layout Inside ScrollView Example Android\" width=\"302\" height=\"475\" \/><\/p>\n<hr \/>\n<h4><strong>Need Of ScrollView:<\/strong><\/h4>\n<p>When we have complex layout with more views(Buttons, TextViews or any other view) then we must enclose them inside another standard layout like Table Layout,\u00a0Relative Layout\u00a0or\u00a0Linear Layout. We can specify layout_width and layout_height to adjust the width and height of screen. We can specify height and width in dp(density pixel) or px(pixel). After enclosing those views \u00a0in a standard layout, enclose the whole layout in ScrollView to make all the element or views scrollable.<\/p>\n<p><span style=\"color: #ff0000;\"><strong>Important Note:<\/strong><\/span>\u00a0In android default ScrollView is used to scroll the items in vertical direction and if we want to scroll the items horizontally then we need to implement horizontal ScrollView. One more important thing is that we never use a Scroll View with a\u00a0ListView\u00a0because List View is default scrollable(i.e. vertical scrollable).<\/p>\n<p><span style=\"color: #008000;\"><strong>Step 1:<\/strong><\/span>\u00a0Create a new project and name it LinearLayoutInsideScrollView.<\/p>\n<p><span style=\"color: #008000;\"><strong>Step 2:\u00a0<\/strong><\/span>Open res -&gt; layout -&gt;activity_main.xml (or) main.xml and add following code:<\/p>\n<p>In this step we open xml file and then create custom layout for user registration form using different views(TextView, EditText or any other view). After creating different views we enclose them inside\u00a0Linear Layout and then we enclose the whole layout in ScrollView to make all the element or views scrollable. In this registration form we display different fields with one Button named \u201cSubmit\u201d to submit the data of the user.<\/p>\n<pre>&lt;LinearLayout xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"\r\nxmlns:tools=\"http:\/\/schemas.android.com\/tools\"\r\nandroid:layout_width=\"match_parent\"\r\nandroid:layout_height=\"match_parent\"\r\nandroid:background=\"@color\/whiteColor\"\r\nandroid:orientation=\"vertical\"\r\nandroid:paddingBottom=\"@dimen\/activity_vertical_margin\"\r\nandroid:paddingLeft=\"@dimen\/activity_horizontal_margin\"\r\nandroid:paddingRight=\"@dimen\/activity_horizontal_margin\"\r\nandroid:paddingTop=\"@dimen\/activity_vertical_margin\"\r\ntools:context=\".MainActivity\"&gt;\r\n&lt;!-- vertical ScrollView to make all the items or views scrollable --&gt;\r\n&lt;ScrollView\r\nandroid:layout_width=\"match_parent\"\r\nandroid:layout_height=\"match_parent\"\r\nandroid:scrollbars=\"none\"&gt;\r\n&lt;!-- LinearLayout Inside ScrollView --&gt;\r\n&lt;LinearLayout\r\nandroid:layout_width=\"match_parent\"\r\nandroid:layout_height=\"match_parent\"\r\nandroid:orientation=\"vertical\"&gt;\r\n\r\n&lt;!-- create a Linear Layout with horizontal orientation and weightSum property --&gt;\r\n\r\n&lt;LinearLayout\r\nandroid:id=\"@+id\/firstLayout\"\r\nandroid:layout_width=\"match_parent\"\r\nandroid:layout_height=\"wrap_content\"\r\nandroid:layout_marginTop=\"20dp\"\r\nandroid:orientation=\"horizontal\"\r\nandroid:weightSum=\"2\"&gt;\r\n\r\n&lt;!-- place one TextView and one EditText inside layout using weight property --&gt;\r\n\r\n&lt;TextView\r\nandroid:layout_width=\"0dp\"\r\nandroid:layout_height=\"50dp\"\r\nandroid:layout_marginRight=\"10dp\"\r\nandroid:layout_weight=\"0.6\"\r\nandroid:gravity=\"center_vertical\"\r\nandroid:paddingLeft=\"10dp\"\r\nandroid:text=\"First Name\"\r\nandroid:textColor=\"@color\/blackColor\" \/&gt;\r\n\r\n&lt;EditText\r\nandroid:id=\"@+id\/firstName\"\r\nandroid:layout_width=\"0dp\"\r\nandroid:layout_height=\"50dp\"\r\nandroid:layout_marginLeft=\"10dp\"\r\nandroid:layout_weight=\"1.4\"\r\nandroid:background=\"@color\/editTextBack\"\r\nandroid:hint=\"First Name\"\r\nandroid:imeOptions=\"actionNext\"\r\nandroid:paddingLeft=\"10dp\"\r\nandroid:singleLine=\"true\"\r\nandroid:textColor=\"@color\/blackColor\" \/&gt;\r\n&lt;\/LinearLayout&gt;\r\n&lt;!-- create a Linear Layout with horizontal orientation and weightSum property --&gt;\r\n\r\n&lt;LinearLayout\r\nandroid:id=\"@+id\/secondLayout\"\r\nandroid:layout_width=\"match_parent\"\r\nandroid:layout_height=\"wrap_content\"\r\nandroid:layout_marginTop=\"20dp\"\r\nandroid:orientation=\"horizontal\"\r\nandroid:weightSum=\"2\"&gt;\r\n\r\n&lt;!-- place one TextView and one EditText inside layout using weight property --&gt;\r\n\r\n&lt;TextView\r\nandroid:layout_width=\"0dp\"\r\nandroid:layout_height=\"50dp\"\r\nandroid:layout_marginRight=\"10dp\"\r\nandroid:layout_weight=\"0.6\"\r\nandroid:gravity=\"center_vertical\"\r\nandroid:paddingLeft=\"10dp\"\r\nandroid:text=\"Last Name\"\r\nandroid:textColor=\"@color\/blackColor\" \/&gt;\r\n\r\n&lt;EditText\r\nandroid:id=\"@+id\/lastName\"\r\nandroid:layout_width=\"0dp\"\r\nandroid:layout_height=\"50dp\"\r\nandroid:layout_marginLeft=\"10dp\"\r\nandroid:layout_weight=\"1.4\"\r\nandroid:background=\"@color\/editTextBack\"\r\nandroid:hint=\"Last Name\"\r\nandroid:imeOptions=\"actionNext\"\r\nandroid:paddingLeft=\"10dp\"\r\nandroid:singleLine=\"true\"\r\nandroid:textColor=\"@color\/blackColor\" \/&gt;\r\n&lt;\/LinearLayout&gt;\r\n&lt;!-- create a Linear Layout with horizontal orientation and weightSum property --&gt;\r\n\r\n&lt;LinearLayout\r\nandroid:id=\"@+id\/thirdLayout\"\r\nandroid:layout_width=\"match_parent\"\r\nandroid:layout_height=\"wrap_content\"\r\nandroid:layout_marginTop=\"20dp\"\r\nandroid:orientation=\"horizontal\"\r\nandroid:weightSum=\"2\"&gt;\r\n\r\n&lt;!-- place one TextView and one EditText inside layout using weight property --&gt;\r\n\r\n&lt;TextView\r\nandroid:layout_width=\"0dp\"\r\nandroid:layout_height=\"50dp\"\r\nandroid:layout_marginRight=\"10dp\"\r\nandroid:layout_weight=\"0.6\"\r\nandroid:gravity=\"center_vertical\"\r\nandroid:paddingLeft=\"10dp\"\r\nandroid:text=\"Address\"\r\nandroid:textColor=\"@color\/blackColor\" \/&gt;\r\n\r\n&lt;EditText\r\nandroid:id=\"@+id\/address\"\r\nandroid:layout_width=\"0dp\"\r\nandroid:layout_height=\"50dp\"\r\nandroid:layout_marginLeft=\"10dp\"\r\nandroid:layout_weight=\"1.4\"\r\nandroid:background=\"@color\/editTextBack\"\r\nandroid:hint=\"Address\"\r\nandroid:imeOptions=\"actionNext\"\r\nandroid:paddingLeft=\"10dp\"\r\nandroid:singleLine=\"true\"\r\nandroid:textColor=\"@color\/blackColor\" \/&gt;\r\n&lt;\/LinearLayout&gt;\r\n&lt;!-- create a Linear Layout with horizontal orientation and weightSum property --&gt;\r\n\r\n&lt;LinearLayout\r\nandroid:id=\"@+id\/fourthLayout\"\r\nandroid:layout_width=\"match_parent\"\r\nandroid:layout_height=\"wrap_content\"\r\nandroid:layout_marginTop=\"20dp\"\r\nandroid:orientation=\"horizontal\"\r\nandroid:weightSum=\"2\"&gt;\r\n\r\n&lt;!-- place one TextView and one EditText inside layout using weight property --&gt;\r\n\r\n&lt;TextView\r\nandroid:layout_width=\"0dp\"\r\nandroid:layout_height=\"50dp\"\r\nandroid:layout_marginRight=\"10dp\"\r\nandroid:layout_weight=\"0.6\"\r\nandroid:gravity=\"center_vertical\"\r\nandroid:paddingLeft=\"10dp\"\r\nandroid:text=\"City\"\r\nandroid:textColor=\"@color\/blackColor\" \/&gt;\r\n\r\n&lt;EditText\r\nandroid:id=\"@+id\/city\"\r\nandroid:layout_width=\"0dp\"\r\nandroid:layout_height=\"50dp\"\r\nandroid:layout_marginLeft=\"10dp\"\r\nandroid:layout_weight=\"1.4\"\r\nandroid:background=\"@color\/editTextBack\"\r\nandroid:hint=\"City\"\r\nandroid:imeOptions=\"actionNext\"\r\nandroid:paddingLeft=\"10dp\"\r\nandroid:singleLine=\"true\"\r\nandroid:textColor=\"@color\/blackColor\" \/&gt;\r\n&lt;\/LinearLayout&gt;\r\n&lt;!-- create a Linear Layout with horizontal orientation and weightSum property --&gt;\r\n\r\n&lt;LinearLayout\r\nandroid:id=\"@+id\/fifthLayout\"\r\nandroid:layout_width=\"match_parent\"\r\nandroid:layout_height=\"wrap_content\"\r\nandroid:layout_marginTop=\"20dp\"\r\nandroid:orientation=\"horizontal\"\r\nandroid:weightSum=\"2\"&gt;\r\n\r\n&lt;!-- place one TextView and one EditText inside layout using weight property --&gt;\r\n\r\n&lt;TextView\r\nandroid:layout_width=\"0dp\"\r\nandroid:layout_height=\"50dp\"\r\nandroid:layout_marginRight=\"10dp\"\r\nandroid:layout_weight=\"0.6\"\r\nandroid:gravity=\"center_vertical\"\r\nandroid:paddingLeft=\"10dp\"\r\nandroid:text=\"State\"\r\nandroid:textColor=\"@color\/blackColor\" \/&gt;\r\n\r\n&lt;EditText\r\nandroid:id=\"@+id\/state\"\r\nandroid:layout_width=\"0dp\"\r\nandroid:layout_height=\"50dp\"\r\nandroid:layout_marginLeft=\"10dp\"\r\nandroid:layout_weight=\"1.4\"\r\nandroid:background=\"@color\/editTextBack\"\r\nandroid:hint=\"State\"\r\nandroid:imeOptions=\"actionNext\"\r\nandroid:paddingLeft=\"10dp\"\r\nandroid:singleLine=\"true\"\r\nandroid:textColor=\"@color\/blackColor\" \/&gt;\r\n&lt;\/LinearLayout&gt;\r\n&lt;!-- create a Linear Layout with horizontal orientation and weightSum property --&gt;\r\n\r\n&lt;LinearLayout\r\nandroid:id=\"@+id\/sixthLayout\"\r\nandroid:layout_width=\"match_parent\"\r\nandroid:layout_height=\"wrap_content\"\r\nandroid:layout_marginTop=\"20dp\"\r\nandroid:orientation=\"horizontal\"\r\nandroid:weightSum=\"2\"&gt;\r\n\r\n&lt;!-- place one TextView and one EditText inside layout using weight property --&gt;\r\n\r\n&lt;TextView\r\nandroid:layout_width=\"0dp\"\r\nandroid:layout_height=\"50dp\"\r\nandroid:layout_marginRight=\"10dp\"\r\nandroid:layout_weight=\"0.6\"\r\nandroid:gravity=\"center_vertical\"\r\nandroid:paddingLeft=\"10dp\"\r\nandroid:text=\"Country\"\r\nandroid:textColor=\"@color\/blackColor\" \/&gt;\r\n\r\n&lt;EditText\r\nandroid:id=\"@+id\/country\"\r\nandroid:layout_width=\"0dp\"\r\nandroid:layout_height=\"50dp\"\r\nandroid:layout_marginLeft=\"10dp\"\r\nandroid:layout_weight=\"1.4\"\r\nandroid:background=\"@color\/editTextBack\"\r\nandroid:hint=\"Country\"\r\nandroid:imeOptions=\"actionNext\"\r\nandroid:paddingLeft=\"10dp\"\r\nandroid:singleLine=\"true\"\r\nandroid:textColor=\"@color\/blackColor\" \/&gt;\r\n&lt;\/LinearLayout&gt;\r\n&lt;!-- create a Linear Layout with horizontal orientation and weightSum property --&gt;\r\n\r\n&lt;LinearLayout\r\nandroid:id=\"@+id\/seventhLayout\"\r\nandroid:layout_width=\"match_parent\"\r\nandroid:layout_height=\"wrap_content\"\r\nandroid:layout_marginTop=\"20dp\"\r\nandroid:orientation=\"horizontal\"\r\nandroid:weightSum=\"2\"&gt;\r\n\r\n&lt;!-- place one TextView and one EditText inside layout using weight property --&gt;\r\n\r\n&lt;TextView\r\nandroid:layout_width=\"0dp\"\r\nandroid:layout_height=\"50dp\"\r\nandroid:layout_marginRight=\"10dp\"\r\nandroid:layout_weight=\"0.6\"\r\nandroid:gravity=\"center_vertical\"\r\nandroid:paddingLeft=\"10dp\"\r\nandroid:text=\"Pin Code\"\r\nandroid:textColor=\"@color\/blackColor\" \/&gt;\r\n\r\n&lt;EditText\r\nandroid:id=\"@+id\/pinCode\"\r\nandroid:layout_width=\"0dp\"\r\nandroid:layout_height=\"50dp\"\r\nandroid:layout_marginLeft=\"10dp\"\r\nandroid:layout_weight=\"1.4\"\r\nandroid:background=\"@color\/editTextBack\"\r\nandroid:hint=\"Pin Code\"\r\nandroid:imeOptions=\"actionNext\"\r\nandroid:inputType=\"number\"\r\nandroid:paddingLeft=\"10dp\"\r\nandroid:singleLine=\"true\"\r\nandroid:textColor=\"@color\/blackColor\" \/&gt;\r\n&lt;\/LinearLayout&gt;\r\n\r\n&lt;LinearLayout\r\nandroid:id=\"@+id\/eightLayout\"\r\nandroid:layout_width=\"match_parent\"\r\nandroid:layout_height=\"wrap_content\"\r\nandroid:layout_marginTop=\"20dp\"\r\nandroid:orientation=\"horizontal\"\r\nandroid:weightSum=\"2\"&gt;\r\n\r\n&lt;!-- place one TextView and one EditText inside layout using weight property --&gt;\r\n\r\n&lt;TextView\r\nandroid:layout_width=\"0dp\"\r\nandroid:layout_height=\"50dp\"\r\nandroid:layout_marginRight=\"10dp\"\r\nandroid:layout_weight=\"0.6\"\r\nandroid:gravity=\"center_vertical\"\r\nandroid:paddingLeft=\"10dp\"\r\nandroid:text=\"Mobile Number\"\r\nandroid:textColor=\"@color\/blackColor\" \/&gt;\r\n\r\n&lt;EditText\r\nandroid:id=\"@+id\/mobileNumber\"\r\nandroid:layout_width=\"0dp\"\r\nandroid:layout_height=\"50dp\"\r\nandroid:layout_marginLeft=\"10dp\"\r\nandroid:layout_weight=\"1.4\"\r\nandroid:background=\"@color\/editTextBack\"\r\nandroid:hint=\"Mobile Number\"\r\nandroid:imeOptions=\"actionNext\"\r\nandroid:inputType=\"number\"\r\nandroid:paddingLeft=\"10dp\"\r\nandroid:singleLine=\"true\"\r\nandroid:textColor=\"@color\/blackColor\" \/&gt;\r\n&lt;\/LinearLayout&gt;\r\n\r\n&lt;Button\r\nandroid:id=\"@+id\/submit\"\r\nandroid:layout_width=\"fill_parent\"\r\nandroid:layout_height=\"wrap_content\"\r\nandroid:layout_marginTop=\"30dp\"\r\nandroid:background=\"@color\/greenColor\"\r\nandroid:text=\"Submit\"\r\nandroid:textColor=\"@color\/whiteColor\" \/&gt;\r\n&lt;\/LinearLayout&gt;\r\n&lt;\/ScrollView&gt;\r\n\r\n&lt;\/LinearLayout&gt;\r\n<\/pre>\n<p><span style=\"color: #008000;\"><strong>Step 3:<\/strong><\/span>\u00a0Open\u00a0 \u00a0src -&gt; package -&gt; MainActivity.java<\/p>\n<p>In this step Firstly we get the reference of different views(TextView, EditText or any other view) that are used in xml file. After that we perform click event on the Button so Whenever a user clicks on Submit Button, we check all the fields are filled or not if filled we display a Successful message by using a toast else we display an error message at that particular field.<\/p>\n<pre>package example.abhiandroid.linearlayoutinsidescrollview;\r\n\r\nimport android.app.Activity;\r\nimport android.os.Bundle;\r\nimport android.view.Menu;\r\nimport android.view.MenuItem;\r\nimport android.view.View;\r\nimport android.widget.Button;\r\nimport android.widget.EditText;\r\nimport android.widget.Toast;\r\n\r\npublic class MainActivity extends Activity {\r\n\r\nButton submitButton;\r\nEditText firstName, lastName, address, city, state, country, pinCode, mobileNumber;\r\n\r\n\/\/ automatically called when the activity is first created\r\n@Override\r\nprotected void onCreate(Bundle savedInstanceState) {\r\nsuper.onCreate(savedInstanceState);\r\nsetContentView(R.layout.activity_main);\r\n\/\/ get the reference of EditText's and Button and then perform click event on Button\r\nfirstName = (EditText) findViewById(R.id.firstName);\r\nlastName = (EditText) findViewById(R.id.lastName);\r\naddress = (EditText) findViewById(R.id.address);\r\ncity = (EditText) findViewById(R.id.city);\r\nstate = (EditText) findViewById(R.id.state);\r\ncountry = (EditText) findViewById(R.id.country);\r\npinCode = (EditText) findViewById(R.id.pinCode);\r\nmobileNumber = (EditText) findViewById(R.id.mobileNumber);\r\nsubmitButton = (Button) findViewById(R.id.submit);\r\n\/\/ perform click event on Button\r\nsubmitButton.setOnClickListener(new View.OnClickListener() {\r\n@Override\r\npublic void onClick(View v) {\r\nif (validate(firstName)&amp;&amp;validate(lastName)&amp;&amp;validate(address)&amp;&amp;validate(city)&amp;&amp;validate(state)&amp;&amp;validate(country)\r\n&amp;&amp;validate(pinCode)&amp;&amp;validate(mobileNumber))\r\n{\r\n\/\/ display successful message if all the fields are filled\r\nToast.makeText(getApplicationContext(),\"SuccessFully Register\",Toast.LENGTH_LONG).show();\r\n}\r\n}\r\n});\r\n}\r\n\r\nprivate boolean validate(EditText editText) {\r\n\/\/ check whether the field is empty or not\r\nif (editText.getText().toString().trim().length() &lt; 1) {\r\n\/\/ display the error if field is empty\r\neditText.setError(\"Please Fill This.!!!\");\r\n\/\/ set focus on field so that cursor will automatically move to that field\r\neditText.requestFocus();\r\nreturn false;\r\n}\r\nreturn true;\r\n}\r\n\r\n@Override\r\npublic boolean onCreateOptionsMenu(Menu menu) {\r\n\/\/ Inflate the menu; this adds items to the action bar if it is present.\r\ngetMenuInflater().inflate(R.menu.menu_main, menu);\r\nreturn true;\r\n}\r\n\r\n@Override\r\npublic boolean onOptionsItemSelected(MenuItem item) {\r\n\/\/ Handle action bar item clicks here. The action bar will\r\n\/\/ automatically handle clicks on the Home\/Up button, so long\r\n\/\/ as you specify a parent activity in AndroidManifest.xml.\r\nint id = item.getItemId();\r\n\r\n\/\/noinspection SimplifiableIfStatement\r\n\r\n\r\nif (id == R.id.action_settings) {\r\nreturn true;\r\n}\r\n\r\nreturn super.onOptionsItemSelected(item);\r\n}\r\n\r\n}\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #008000;\"><strong>Step 4:<\/strong><\/span>\u00a0Open\u00a0 \u00a0res -&gt; values-&gt; colors.xml<\/p>\n<p>In this step we define the colors (red, green and white) that used in the background and text color of view\u2019s.<\/p>\n<pre>&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\r\n&lt;resources&gt;\r\n&lt;!-- define colors used in our xml file--&gt;\r\n&lt;color name=\"whiteColor\"&gt;#fff&lt;\/color&gt;\r\n&lt;color name=\"blackColor\"&gt;#000&lt;\/color&gt;\r\n&lt;color name=\"editTextBack\"&gt;#f2f2f2&lt;\/color&gt;\r\n&lt;color name=\"greenColor\"&gt;#0f0&lt;\/color&gt;\r\n&lt;\/resources&gt;\r\n<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p>Now run the App and you will see a form asking generation information which is scrollable.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here in this\u00a0example of Linear Layout inside ScrollView we create a custom layout for user registration form using different views(TextView, EditText etc). After creating different views we enclose them inside\u00a0Linear Layout and then we enclose the whole layout in ScrollView to make all the element or views scrollable. In this registration form we display different &hellip; <a href=\"https:\/\/abhiandroid.com\/ui\/linear-layout-inside-scrollview.html\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Linear Layout Inside ScrollView Example In Android Studio<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":2013,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,67],"tags":[],"class_list":["post-1984","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-archieve","category-layout"],"acf":[],"psp_head":"<title>Linear Layout Inside ScrollView Example In Android Studio \u2013 Abhi Android<\/title>\r\n<meta name=\"description\" content=\"Here in this example of Linear Layout inside ScrollView we create a custom layout for user registration form using different views(TextView, EditText etc). After creating different views we enclose them inside Linear Layout and then we enclose the whole layout in ScrollView to make all the element or views scrollable.\" \/>\r\n<meta name=\"robots\" content=\"index,follow\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/abhiandroid.com\/ui\/linear-layout-inside-scrollview.html\" \/>\r\n","_links":{"self":[{"href":"https:\/\/abhiandroid.com\/ui\/wp-json\/wp\/v2\/posts\/1984","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/abhiandroid.com\/ui\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/abhiandroid.com\/ui\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/abhiandroid.com\/ui\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/abhiandroid.com\/ui\/wp-json\/wp\/v2\/comments?post=1984"}],"version-history":[{"count":3,"href":"https:\/\/abhiandroid.com\/ui\/wp-json\/wp\/v2\/posts\/1984\/revisions"}],"predecessor-version":[{"id":2851,"href":"https:\/\/abhiandroid.com\/ui\/wp-json\/wp\/v2\/posts\/1984\/revisions\/2851"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/abhiandroid.com\/ui\/wp-json\/wp\/v2\/media\/2013"}],"wp:attachment":[{"href":"https:\/\/abhiandroid.com\/ui\/wp-json\/wp\/v2\/media?parent=1984"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/abhiandroid.com\/ui\/wp-json\/wp\/v2\/categories?post=1984"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/abhiandroid.com\/ui\/wp-json\/wp\/v2\/tags?post=1984"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}