Article,What is application layout and how can it be done?
نوشته شده توسط : dotnek

This word is a general word which means that multiple views are used.Pane actually means multiple views. Of course, composite views that consist of several views are displayed according to the size and capacity of the screen. It should be noted that if there is not enough space to display multiple panels or composite views, only one view or one panel is displayed. In this part of the tutorial, we want to tell you about Fragments in the Android operating system , it is recommended that you follow this article.

What is a Fragment?

Fragments are independent components that can be used by any activity. It should be noted that fragments encapsulate all the necessary capabilities, so it is encapsulation that is easy to use in activity and layout.Although the fragments are inside the text of the activities, they also have a separate life-cycle and user interface. Of course, it is possible that Fragment Hubs are below the user interface and it is possible to define them without the user interface. Examples of fragments without a user interface include a headless fragment.

How to access Context

It should be noted that fragments are not below the Context class. Because fragments are not under the Context class, it is best to use the getActivity () method to access parent activities as well.

Advantages of using fragments

Using Fragment makes it possible to reuse components in layouts. In other words, fragments make it possible to reuse components in the layout. For example, you can define single-frame layouts for phones and multi-frame layouts for smartphones and tablets. Fragments on Android smartphones can be defined to support both landscape and portrait orientations.This is why fragments can be easily added or removed dynamically to the activity.An example for this section is that all the activity items in the tablet device are on one page, and in order to be able to access the activities, we can select the desired item from the same page. But in order to be able to access items on mobile smart devices , we must select the detail screen to make the page wider and be able to select the item we want.For example, suppose you have two fragments, one of which is main and the other is detail. Also consider that you have two activities, one of which is main and the other is detailed. It is noteworthy that in the tablet smartphone, the main activity consists of two fragments, while the smartphone devices have the main fragment in the activity.

How to support screens of different sizes using fragments?

To do this, you can define fragments of each activity inside the layout file, which is called static definition file definition. If we define them when they will be executed, they will be called dynamic definition.In order to be able to display different fragments inside the screens based on the available spaces, you must use the activity that displays two fragments on smartphones and tablets. 

Read more on:https://www.dotnek.com/Blog/Apps/what-is-application-layout-and-how-can-it-be

link:https://dotnek.mystrikingly.com/

Related link:DotNek Website Analysis





:: برچسب‌ها: dotnek , seo , site ,
:: بازدید از این مطلب : 34
|
امتیاز مطلب : 0
|
تعداد امتیازدهندگان : 0
|
مجموع امتیاز : 0
تاریخ انتشار : دو شنبه 18 مرداد 1400 | نظرات ()
مطالب مرتبط با این پست
لیست
می توانید دیدگاه خود را بنویسید


نام
آدرس ایمیل
وب سایت/بلاگ
:) :( ;) :D
;)) :X :? :P
:* =(( :O };-
:B /:) =DD :S
-) :-(( :-| :-))
نظر خصوصی

 کد را وارد نمایید:

آپلود عکس دلخواه: