{"id":32836,"date":"2016-02-26T10:11:04","date_gmt":"2016-02-26T04:41:04","guid":{"rendered":"https:\/\/tothenewco.pro\/blog\/?p=32836"},"modified":"2016-03-14T10:43:59","modified_gmt":"2016-03-14T05:13:59","slug":"percentrelativelayout-in-android","status":"publish","type":"post","link":"https:\/\/tothenewco.pro\/blog\/percentrelativelayout-in-android\/","title":{"rendered":"PercentRelativeLayout in Android"},"content":{"rendered":"<p>During most of the <a title=\"Android App Development Services\" href=\"https:\/\/tothenewco.pro\/mobile-android-application-development-services\">android design and development<\/a> , we mainly use three types of layout: <em><strong>LineraLayout ,RelativeLayout, FrameLayout<\/strong><\/em>. And for creating complex view we use weight property to distribute view across screens.<\/p>\n<p>But while using weights you must have noticed that we have to add a default container view to encapsulate our child view . Now problem with this approach is it adds an additional view hierarchy to our layout, which is of no use except holding child view and holding weight sum value.<\/p>\n<blockquote><p><em><strong>Last year, android has introduced a new layout called\u00a0PercentRelativeLayout which gives us the functionality of both relativelayout and weight property together .<\/strong><\/em><\/p><\/blockquote>\n<p><em><a href=\"http:\/\/developer.android.com\/reference\/android\/support\/percent\/PercentRelativeLayout.html\"><strong>PercentRelativeLayout<\/strong><\/a>\u00a0is same as relative layout with an additional feature &#8216;percentage&#8217;. we can put percentage on view component (out of 100) in terms of width,height,margins etc.<\/em><\/p>\n<p>Or simply we can say use relative percent layout as linear layout as it has features of both along with reduced view complexity.<\/p>\n<p>To use percent relative layout add gradle path i.e :<\/p>\n<p>[sourcecode language=&#8221;java&#8221;]<br \/>\ncompile &#8216;com.android.support:percent:23.1.1&#8217; in your build.gradle file.<br \/>\n[\/sourcecode]<\/p>\n<p>And you are on.<\/p>\n<p>An Example shown below\u00a0depict&#8217;s how to use and comparison of view hierarchy of two layouts, with and without <strong>PercentRelativeLayout<\/strong><\/p>\n<p>Let&#8217;s make it using linearLayout first.<\/p>\n<p>[sourcecode language=&#8221;java&#8221;]<br \/>\n&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;&lt;\/pre&gt;<br \/>\n&lt;LinearLayout xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;<br \/>\nxmlns:app=&quot;http:\/\/schemas.android.com\/apk\/res-auto&quot;<br \/>\nandroid:layout_width=&quot;match_parent&quot;<br \/>\nandroid:layout_height=&quot;match_parent&quot;<br \/>\nandroid:orientation=&quot;vertical&quot;<br \/>\nandroid:weightSum=&quot;4&quot;&gt;<\/p>\n<p>&lt;LinearLayout<br \/>\nandroid:layout_width=&quot;match_parent&quot;<br \/>\nandroid:layout_height=&quot;0dp&quot;<br \/>\nandroid:layout_weight=&quot;1.5&quot;<br \/>\nandroid:gravity=&quot;center&quot;&gt;<\/p>\n<p>&lt;TextView<br \/>\nandroid:layout_width=&quot;wrap_content&quot;<br \/>\nandroid:layout_height=&quot;wrap_content&quot;<br \/>\nandroid:text=&quot;MAIN HEADER&quot;<br \/>\nandroid:textSize=&quot;50dp&quot; \/&gt;<\/p>\n<p>&lt;\/LinearLayout&gt;<\/p>\n<p>&lt;LinearLayout<br \/>\nandroid:layout_width=&quot;match_parent&quot;<br \/>\nandroid:layout_height=&quot;0dp&quot;<br \/>\nandroid:layout_weight=&quot;1&quot;<br \/>\nandroid:orientation=&quot;vertical&quot;&gt;<\/p>\n<p>&lt;TextView<br \/>\nandroid:id=&quot;@+id\/textview_sub_header&quot;<br \/>\nandroid:layout_width=&quot;match_parent&quot;<br \/>\nandroid:layout_height=&quot;wrap_content&quot;<br \/>\nandroid:layout_marginTop=&quot;20dp&quot;<br \/>\nandroid:gravity=&quot;center&quot;<br \/>\nandroid:text=&quot;Sub Header&quot;<br \/>\nandroid:textSize=&quot;25dp&quot;\/&gt;<\/p>\n<p>&lt;\/LinearLayout&gt;<\/p>\n<p>&lt;LinearLayout<br \/>\nandroid:layout_width=&quot;match_parent&quot;<br \/>\nandroid:layout_height=&quot;0dp&quot;<br \/>\nandroid:layout_weight=&quot;0.5&quot;<br \/>\nandroid:orientation=&quot;horizontal&quot;&gt;<\/p>\n<p>&lt;Button<br \/>\nandroid:id=&quot;@+id\/button&quot;<br \/>\nandroid:layout_width=&quot;match_parent&quot;<br \/>\nandroid:layout_height=&quot;80dp&quot;<br \/>\nandroid:text=&quot;Button&quot;<br \/>\nandroid:background=&quot;@android:color\/holo_blue_light&quot;<br \/>\nandroid:textColor=&quot;@android:color\/white&quot;<br \/>\nandroid:textSize=&quot;25dp&quot;<br \/>\nandroid:textStyle=&quot;bold&quot;\/&gt;<\/p>\n<p>&lt;\/LinearLayout&gt;<\/p>\n<p>&lt;TextView<br \/>\nandroid:id=&quot;@+id\/textview_bottom_text&quot;<br \/>\nandroid:layout_width=&quot;match_parent&quot;<br \/>\nandroid:layout_height=&quot;0dp&quot;<br \/>\nandroid:layout_weight=&quot;1.0&quot;<br \/>\nandroid:gravity=&quot;center&quot;<br \/>\nandroid:text=&quot;BOTTOM TEXT&quot;<br \/>\nandroid:textSize=&quot;20dp&quot;\/&gt;<\/p>\n<p>&lt;\/LinearLayout&gt;<br \/>\n[\/sourcecode]<\/p>\n<p>and now with the percentLayout<\/p>\n<p>[sourcecode language=&#8221;java&#8221;]<br \/>\n&lt;android.support.percent.PercentRelativeLayout xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;<br \/>\nxmlns:app=&quot;http:\/\/schemas.android.com\/apk\/res-auto&quot;<br \/>\nandroid:layout_width=&quot;match_parent&quot;<br \/>\nandroid:layout_height=&quot;match_parent&quot;&gt;<\/p>\n<p>&lt;TextView<br \/>\nandroid:id=&quot;@+id\/textview_title&quot;<br \/>\nandroid:layout_centerHorizontal=&quot;true&quot;<br \/>\napp:layout_heightPercent=&quot;10%&quot;<br \/>\nandroid:gravity=&quot;center&quot;<br \/>\napp:layout_marginTopPercent=&quot;14%&quot;<br \/>\napp:layout_widthPercent=&quot;100%&quot;<br \/>\nandroid:textSize=&quot;50dp&quot;<br \/>\nandroid:text=&quot;MAIN HEADER&quot;\/&gt;<\/p>\n<p>&lt;TextView<br \/>\nandroid:id=&quot;@+id\/textview_sub_header&quot;<br \/>\nandroid:layout_height=&quot;wrap_content&quot;<br \/>\nandroid:layout_below=&quot;@+id\/textview_title&quot;<br \/>\nandroid:gravity=&quot;center&quot;<br \/>\nandroid:text=&quot;Sub Header&quot;<br \/>\nandroid:textSize=&quot;25dp&quot;<br \/>\napp:layout_marginTopPercent=&quot;17%&quot;<br \/>\napp:layout_widthPercent=&quot;100%&quot; \/&gt;<\/p>\n<p>&lt;Button<br \/>\nandroid:id=&quot;@+id\/button_blogger&quot;<br \/>\nandroid:layout_below=&quot;@+id\/textview_sub_header&quot;<br \/>\nandroid:text=&quot;button&quot;<br \/>\nandroid:textColor=&quot;@android:color\/white&quot;<br \/>\nandroid:textSize=&quot;25dp&quot;<br \/>\nandroid:textStyle=&quot;bold&quot;<br \/>\nandroid:background=&quot;@android:color\/holo_blue_light&quot;<br \/>\napp:layout_heightPercent=&quot;13%&quot;<br \/>\napp:layout_marginTopPercent=&quot;16%&quot;<br \/>\napp:layout_widthPercent=&quot;100%&quot; \/&gt;<\/p>\n<p>&lt;TextView<br \/>\nandroid:id=&quot;@+id\/textview_bottom_text&quot;<br \/>\nandroid:layout_height=&quot;match_parent&quot;<br \/>\nandroid:layout_below=&quot;@+id\/button_blogger&quot;<br \/>\nandroid:gravity=&quot;center&quot;<br \/>\nandroid:text=&quot;BOTTOM TEXT&quot;<br \/>\nandroid:textSize=&quot;20dp&quot;<br \/>\napp:layout_widthPercent=&quot;100%&quot; \/&gt;<\/p>\n<p>&lt;\/android.support.percent.PercentRelativeLayout&gt;<br \/>\n[\/sourcecode]<\/p>\n<p>&nbsp;<\/p>\n<p>Below Images showing the preview of the above two layouts :<\/p>\n<div style=\"width: 100%; height: 100%; clear: both; overflow: hidden;\"><img decoding=\"async\" style=\"float: left; width: 49%; height: 100%;\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/02\/simple.png\" alt=\"preview1\" \/><br \/>\n<img decoding=\"async\" style=\"float: right; width: 49%; height: 100%; margin-top: 0;\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/02\/percentLayout.png\" alt=\"preview2\" \/><\/div>\n<p>And let&#8217;s see the diffrence in the view hierarchy:<\/p>\n<div style=\"width: 100%; height: 100%; clear: both; overflow: hidden;\"><img decoding=\"async\" style=\"float: left; width: 49%; height: 100%;\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/02\/heirarchy_preview2.png\" alt=\"preview1\" \/><br \/>\n<img decoding=\"async\" style=\"float: right; width: 49%; height: 100%; margin-top: 0;\" src=\"\/blog\/wp-ttn-blog\/uploads\/2016\/02\/preview1_hrrarchy.png\" alt=\"heirarchy_preview2\" \/><\/div>\n<p>In this way we can reduce the view complexity using percentRelativeLayout.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>During most of the android design and development , we mainly use three types of layout: LineraLayout ,RelativeLayout, FrameLayout. And for creating complex view we use weight property to distribute view across screens. But while using weights you must have noticed that we have to add a default container view to encapsulate our child view [&hellip;]<\/p>\n","protected":false},"author":156,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":26,"footnotes":""},"categories":[518,1],"tags":[3164,3165],"class_list":["post-32836","post","type-post","status-publish","format-standard","hentry","category-android","category-technology","tag-reducing-view-complexity-in-android","tag-weight-property-issues"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"During most of the android design and development , we mainly use three types of layout: LineraLayout ,RelativeLayout, FrameLayout. And for creating complex view we use weight property to distribute view across screens. But while using weights you must have noticed that we have to add a default container view to encapsulate our child view\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Vaibhav Chahal\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/tothenewco.pro\/blog\/percentrelativelayout-in-android\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"PercentRelativeLayout in Android | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"During most of the android design and development , we mainly use three types of layout: LineraLayout ,RelativeLayout, FrameLayout. And for creating complex view we use weight property to distribute view across screens. But while using weights you must have noticed that we have to add a default container view to encapsulate our child view\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/tothenewco.pro\/blog\/percentrelativelayout-in-android\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"PercentRelativeLayout in Android | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"During most of the android design and development , we mainly use three types of layout: LineraLayout ,RelativeLayout, FrameLayout. And for creating complex view we use weight property to distribute view across screens. But while using weights you must have noticed that we have to add a default container view to encapsulate our child view\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/percentrelativelayout-in-android\\\/#article\",\"name\":\"PercentRelativeLayout in Android | TO THE NEW Blog\",\"headline\":\"PercentRelativeLayout in Android\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vaibhav-chahalintelligrape-com\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"\\\/blog\\\/wp-ttn-blog\\\/uploads\\\/2016\\\/02\\\/simple.png\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/percentrelativelayout-in-android\\\/#articleImage\"},\"datePublished\":\"2016-02-26T10:11:04+05:30\",\"dateModified\":\"2016-03-14T10:43:59+05:30\",\"inLanguage\":\"en-US\",\"commentCount\":5,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/percentrelativelayout-in-android\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/percentrelativelayout-in-android\\\/#webpage\"},\"articleSection\":\"Android, Technology, reducing view complexity in Android, weight property issues\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/percentrelativelayout-in-android\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"position\":2,\"name\":\"Technology\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/percentrelativelayout-in-android\\\/#listItem\",\"name\":\"PercentRelativeLayout in Android\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/percentrelativelayout-in-android\\\/#listItem\",\"position\":3,\"name\":\"PercentRelativeLayout in Android\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vaibhav-chahalintelligrape-com\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vaibhav-chahalintelligrape-com\\\/\",\"name\":\"Vaibhav Chahal\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/percentrelativelayout-in-android\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3398aeee6e2c0b9628213013b8ab63af0b60fd4f4619846feac746f12e39459d?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Vaibhav Chahal\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/percentrelativelayout-in-android\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/percentrelativelayout-in-android\\\/\",\"name\":\"PercentRelativeLayout in Android | TO THE NEW Blog\",\"description\":\"During most of the android design and development , we mainly use three types of layout: LineraLayout ,RelativeLayout, FrameLayout. And for creating complex view we use weight property to distribute view across screens. But while using weights you must have noticed that we have to add a default container view to encapsulate our child view\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/percentrelativelayout-in-android\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vaibhav-chahalintelligrape-com\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/vaibhav-chahalintelligrape-com\\\/#author\"},\"datePublished\":\"2016-02-26T10:11:04+05:30\",\"dateModified\":\"2016-03-14T10:43:59+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"PercentRelativeLayout in Android | TO THE NEW Blog","description":"During most of the android design and development , we mainly use three types of layout: LineraLayout ,RelativeLayout, FrameLayout. And for creating complex view we use weight property to distribute view across screens. But while using weights you must have noticed that we have to add a default container view to encapsulate our child view","canonical_url":"https:\/\/tothenewco.pro\/blog\/percentrelativelayout-in-android\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/tothenewco.pro\/blog\/percentrelativelayout-in-android\/#article","name":"PercentRelativeLayout in Android | TO THE NEW Blog","headline":"PercentRelativeLayout in Android","author":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/vaibhav-chahalintelligrape-com\/#author"},"publisher":{"@id":"https:\/\/tothenewco.pro\/blog\/#organization"},"image":{"@type":"ImageObject","url":"\/blog\/wp-ttn-blog\/uploads\/2016\/02\/simple.png","@id":"https:\/\/tothenewco.pro\/blog\/percentrelativelayout-in-android\/#articleImage"},"datePublished":"2016-02-26T10:11:04+05:30","dateModified":"2016-03-14T10:43:59+05:30","inLanguage":"en-US","commentCount":5,"mainEntityOfPage":{"@id":"https:\/\/tothenewco.pro\/blog\/percentrelativelayout-in-android\/#webpage"},"isPartOf":{"@id":"https:\/\/tothenewco.pro\/blog\/percentrelativelayout-in-android\/#webpage"},"articleSection":"Android, Technology, reducing view complexity in Android, weight property issues"},{"@type":"BreadcrumbList","@id":"https:\/\/tothenewco.pro\/blog\/percentrelativelayout-in-android\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog#listItem","position":1,"name":"Home","item":"https:\/\/tothenewco.pro\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/technology\/#listItem","name":"Technology"}},{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/technology\/#listItem","position":2,"name":"Technology","item":"https:\/\/tothenewco.pro\/blog\/category\/technology\/","nextItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/percentrelativelayout-in-android\/#listItem","name":"PercentRelativeLayout in Android"},"previousItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/percentrelativelayout-in-android\/#listItem","position":3,"name":"PercentRelativeLayout in Android","previousItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/technology\/#listItem","name":"Technology"}}]},{"@type":"Organization","@id":"https:\/\/tothenewco.pro\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/tothenewco.pro\/blog\/"},{"@type":"Person","@id":"https:\/\/tothenewco.pro\/blog\/author\/vaibhav-chahalintelligrape-com\/#author","url":"https:\/\/tothenewco.pro\/blog\/author\/vaibhav-chahalintelligrape-com\/","name":"Vaibhav Chahal","image":{"@type":"ImageObject","@id":"https:\/\/tothenewco.pro\/blog\/percentrelativelayout-in-android\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/3398aeee6e2c0b9628213013b8ab63af0b60fd4f4619846feac746f12e39459d?s=96&d=mm&r=g","width":96,"height":96,"caption":"Vaibhav Chahal"}},{"@type":"WebPage","@id":"https:\/\/tothenewco.pro\/blog\/percentrelativelayout-in-android\/#webpage","url":"https:\/\/tothenewco.pro\/blog\/percentrelativelayout-in-android\/","name":"PercentRelativeLayout in Android | TO THE NEW Blog","description":"During most of the android design and development , we mainly use three types of layout: LineraLayout ,RelativeLayout, FrameLayout. And for creating complex view we use weight property to distribute view across screens. But while using weights you must have noticed that we have to add a default container view to encapsulate our child view","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/tothenewco.pro\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/tothenewco.pro\/blog\/percentrelativelayout-in-android\/#breadcrumblist"},"author":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/vaibhav-chahalintelligrape-com\/#author"},"creator":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/vaibhav-chahalintelligrape-com\/#author"},"datePublished":"2016-02-26T10:11:04+05:30","dateModified":"2016-03-14T10:43:59+05:30"},{"@type":"WebSite","@id":"https:\/\/tothenewco.pro\/blog\/#website","url":"https:\/\/tothenewco.pro\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/tothenewco.pro\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"PercentRelativeLayout in Android | TO THE NEW Blog","og:description":"During most of the android design and development , we mainly use three types of layout: LineraLayout ,RelativeLayout, FrameLayout. And for creating complex view we use weight property to distribute view across screens. But while using weights you must have noticed that we have to add a default container view to encapsulate our child view","og:url":"https:\/\/tothenewco.pro\/blog\/percentrelativelayout-in-android\/","og:image":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"PercentRelativeLayout in Android | TO THE NEW Blog","twitter:description":"During most of the android design and development , we mainly use three types of layout: LineraLayout ,RelativeLayout, FrameLayout. And for creating complex view we use weight property to distribute view across screens. But while using weights you must have noticed that we have to add a default container view to encapsulate our child view","twitter:image":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"32836","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":"","og_description":"","og_object_type":"blog","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":"","og_article_tags":"","twitter_use_og":false,"twitter_card":"summary","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-30 06:11:39","updated":"2024-02-29 08:46:39","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/tothenewco.pro\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/tothenewco.pro\/blog\/category\/technology\/\" title=\"Technology\">Technology<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tPercentRelativeLayout in Android\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/tothenewco.pro\/blog"},{"label":"Technology","link":"https:\/\/tothenewco.pro\/blog\/category\/technology\/"},{"label":"PercentRelativeLayout in Android","link":"https:\/\/tothenewco.pro\/blog\/percentrelativelayout-in-android\/"}],"_links":{"self":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts\/32836","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/users\/156"}],"replies":[{"embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/comments?post=32836"}],"version-history":[{"count":0,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts\/32836\/revisions"}],"wp:attachment":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/media?parent=32836"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/categories?post=32836"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/tags?post=32836"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}