{"id":75,"date":"2019-09-23T09:03:53","date_gmt":"2019-09-23T09:03:53","guid":{"rendered":"http:\/\/cbitss.com\/blog\/?p=75"},"modified":"2019-09-23T09:03:53","modified_gmt":"2019-09-23T09:03:53","slug":"why-we-use-fragments-in-android","status":"publish","type":"post","link":"https:\/\/www.cbitss.com\/blog\/why-we-use-fragments-in-android\/","title":{"rendered":"Why we use fragments in Android ?"},"content":{"rendered":"<p>A Fragment is a section of an activity which facilitate more modular activity design. It will not be wrong if we say, a fragment is a amiable of sub-activity. A <em><strong><span style=\"text-decoration: underline;\"><a href=\"http:\/\/www.tutorialspoint.com\/android\/android_fragments.htm\" target=\"_blank\" rel=\"noopener noreferrer\">fragment<\/a><\/span><\/strong><\/em> substitute a behavior or segment of user interface in an Activity. You can associate multiple fragments in a single enterprise to build a multi-pane UI and change a fragment in numerous activities. You can consider a fragment as a commutable section of an activity, which has its individual lifecycle, accept its peculiar input events, and which you can add or remove while the activity is executing .<\/p>\n<ul>\n<li>A fragment has its own design and its own behavior with its individual lifecycle callbacks.<\/li>\n<\/ul>\n<ul>\n<li>You can add or remove fragments in an enterprise while the activity is running.<\/li>\n<li>You can merge multiple fragments in a single activity to frame a multi-pane UI.<\/li>\n<li>A fragment can be used in numerous activities.<\/li>\n<li>Fragment life cycle is firmly related to the lifecycle of its presenter activity.<\/li>\n<li>When the activity is stoped, all the fragments usable in the acivity will also be interrupted.<\/li>\n<li>A fragment can appliance a behavior that has no user interface fundamental.<\/li>\n<li>Fragments were joined to the Android API in version of android Honeycomb which API version 11.<\/li>\n<li>Encapsulation of logic.<\/li>\n<li>Exceptional handle of the lifecycle of the fragment.<\/li>\n<li>Renewable in other active.<\/li>\n<\/ul>\n<p><strong>Ten things our smartphones earlier have or will finally replace :<\/strong><\/p>\n<ol>\n<li>GPS Devices<\/li>\n<li>Landline Phones<\/li>\n<li>Books<\/li>\n<li>Music Players<\/li>\n<li>Wallets<\/li>\n<li>Remote &amp; Switches<\/li>\n<li>Cameras<\/li>\n<li>Video Games<\/li>\n<li>Cable TV<\/li>\n<li>Watches \/ Clocks<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>A Fragment is a section of an activity which facilitate more modular activity design. It will not be wrong if we say, a fragment is a amiable of sub-activity. A fragment substitute a behavior or segment of user interface in an Activity. You can associate multiple fragments in a single enterprise to build a multi-pane [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-75","post","type-post","status-publish","format-standard","hentry","category-cbitss-blog"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Why we use fragments in Android ? - Industrial Training in Chandigarh<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.cbitss.com\/blog\/why-we-use-fragments-in-android\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Why we use fragments in Android ? - Industrial Training in Chandigarh\" \/>\n<meta property=\"og:description\" content=\"A Fragment is a section of an activity which facilitate more modular activity design. It will not be wrong if we say, a fragment is a amiable of sub-activity. A fragment substitute a behavior or segment of user interface in an Activity. You can associate multiple fragments in a single enterprise to build a multi-pane [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.cbitss.com\/blog\/why-we-use-fragments-in-android\/\" \/>\n<meta property=\"og:site_name\" content=\"Industrial Training in Chandigarh\" \/>\n<meta property=\"article:published_time\" content=\"2019-09-23T09:03:53+00:00\" \/>\n<meta name=\"author\" content=\"Cb!tss@Adm!n\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Cb!tss@Adm!n\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.cbitss.com\/blog\/why-we-use-fragments-in-android\/\",\"url\":\"https:\/\/www.cbitss.com\/blog\/why-we-use-fragments-in-android\/\",\"name\":\"Why we use fragments in Android ? - Industrial Training in Chandigarh\",\"isPartOf\":{\"@id\":\"https:\/\/www.cbitss.com\/blog\/#website\"},\"datePublished\":\"2019-09-23T09:03:53+00:00\",\"dateModified\":\"2019-09-23T09:03:53+00:00\",\"author\":{\"@id\":\"https:\/\/www.cbitss.com\/blog\/#\/schema\/person\/363fe27e743d733123ea7e7e4a853277\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.cbitss.com\/blog\/why-we-use-fragments-in-android\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.cbitss.com\/blog\/why-we-use-fragments-in-android\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.cbitss.com\/blog\/why-we-use-fragments-in-android\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.cbitss.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Why we use fragments in Android ?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.cbitss.com\/blog\/#website\",\"url\":\"https:\/\/www.cbitss.com\/blog\/\",\"name\":\"Industrial Training in Chandigarh\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.cbitss.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.cbitss.com\/blog\/#\/schema\/person\/363fe27e743d733123ea7e7e4a853277\",\"name\":\"Cb!tss@Adm!n\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.cbitss.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8f948519eca793dbf75e59bf68a5ac24fc5dc1453c9eb7648a8499735b9f07d0?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/8f948519eca793dbf75e59bf68a5ac24fc5dc1453c9eb7648a8499735b9f07d0?s=96&d=mm&r=g\",\"caption\":\"Cb!tss@Adm!n\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Why we use fragments in Android ? - Industrial Training in Chandigarh","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:\/\/www.cbitss.com\/blog\/why-we-use-fragments-in-android\/","og_locale":"en_US","og_type":"article","og_title":"Why we use fragments in Android ? - Industrial Training in Chandigarh","og_description":"A Fragment is a section of an activity which facilitate more modular activity design. It will not be wrong if we say, a fragment is a amiable of sub-activity. A fragment substitute a behavior or segment of user interface in an Activity. You can associate multiple fragments in a single enterprise to build a multi-pane [&hellip;]","og_url":"https:\/\/www.cbitss.com\/blog\/why-we-use-fragments-in-android\/","og_site_name":"Industrial Training in Chandigarh","article_published_time":"2019-09-23T09:03:53+00:00","author":"Cb!tss@Adm!n","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Cb!tss@Adm!n","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.cbitss.com\/blog\/why-we-use-fragments-in-android\/","url":"https:\/\/www.cbitss.com\/blog\/why-we-use-fragments-in-android\/","name":"Why we use fragments in Android ? - Industrial Training in Chandigarh","isPartOf":{"@id":"https:\/\/www.cbitss.com\/blog\/#website"},"datePublished":"2019-09-23T09:03:53+00:00","dateModified":"2019-09-23T09:03:53+00:00","author":{"@id":"https:\/\/www.cbitss.com\/blog\/#\/schema\/person\/363fe27e743d733123ea7e7e4a853277"},"breadcrumb":{"@id":"https:\/\/www.cbitss.com\/blog\/why-we-use-fragments-in-android\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.cbitss.com\/blog\/why-we-use-fragments-in-android\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.cbitss.com\/blog\/why-we-use-fragments-in-android\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.cbitss.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Why we use fragments in Android ?"}]},{"@type":"WebSite","@id":"https:\/\/www.cbitss.com\/blog\/#website","url":"https:\/\/www.cbitss.com\/blog\/","name":"Industrial Training in Chandigarh","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.cbitss.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.cbitss.com\/blog\/#\/schema\/person\/363fe27e743d733123ea7e7e4a853277","name":"Cb!tss@Adm!n","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.cbitss.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/8f948519eca793dbf75e59bf68a5ac24fc5dc1453c9eb7648a8499735b9f07d0?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8f948519eca793dbf75e59bf68a5ac24fc5dc1453c9eb7648a8499735b9f07d0?s=96&d=mm&r=g","caption":"Cb!tss@Adm!n"}}]}},"_links":{"self":[{"href":"https:\/\/www.cbitss.com\/blog\/wp-json\/wp\/v2\/posts\/75","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cbitss.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cbitss.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cbitss.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cbitss.com\/blog\/wp-json\/wp\/v2\/comments?post=75"}],"version-history":[{"count":1,"href":"https:\/\/www.cbitss.com\/blog\/wp-json\/wp\/v2\/posts\/75\/revisions"}],"predecessor-version":[{"id":76,"href":"https:\/\/www.cbitss.com\/blog\/wp-json\/wp\/v2\/posts\/75\/revisions\/76"}],"wp:attachment":[{"href":"https:\/\/www.cbitss.com\/blog\/wp-json\/wp\/v2\/media?parent=75"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cbitss.com\/blog\/wp-json\/wp\/v2\/categories?post=75"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cbitss.com\/blog\/wp-json\/wp\/v2\/tags?post=75"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}