0

I have tried searching for helpful information on what the android.text.Layout class is and its application. I read the documentation page here and it is not clear how it is used and in what context. I could not find any direct questions regarding this class on StackOverflow or elsewhere, and so far it I haven't found it covered in the course material that I am using.

The reason I am searching for it is because I want to know if it is something entirely different from "layouts" as generally known, such as ConstraintLayout, LinearLayout etc., which are classes derived from the android.view.ViewGroup base class.

I feel there is a cause for confusion here because LinearLayout etc. which is what we usually mean by the word "layout" are derived from a ViewGroup class, whereas the class actually named "Layout" seems to have nothing to do with layouts as commonly known and is derived from java.lang.object (or kotlin.Any in Kotlin)

In this context, I request clarification and perspectives regarding the android.text.Layout class and its use. Thanks.

SJB
  • 117
  • 1
  • 2
  • 11
  • 1
    https://stackoverflow.com/questions/41779934/how-is-staticlayout-used-in-android – Gabriele Mariotti Jul 22 '20 at 06:04
  • Thanks for your comment. That link is partially helpful, but what I wanted to understand was if there was any connection (conceptually or from a code/design perspective) between the `android.text.Layout` and the "layouts" which are view groups used for organizing other views. Can I conclude the two are entirely unrelated? – SJB Jul 22 '20 at 06:47
  • 1
    `android.text.Layout` is an `abstract` class and `StaticLayout`, `DynamicLayout` and `BoringLayout` extend it. They are not related to the `ViewGroup`s as `LinearLayout`,`FrameLayout`.... – Gabriele Mariotti Jul 22 '20 at 06:53
  • Thank you for your answer and for confirming that the two are not related. – SJB Jul 22 '20 at 07:01

0 Answers0