1. Are you ready for the Galaxy S20? Here is everything we know so far!

how to create a custom layout that is capable of rotating any of its child view/or nested layouts

Discussion in 'Android Development' started by bjourine stekarfield, Sep 1, 2020.

  1. bjourine stekarfield

    Thread Starter

    I am having so much confusion creating custom layouts that can rotate it's child layout/views(any number of then nested). (Should I just think about rotating it's direct child only?) The closest I could find was this library: rotate-layout , but for some reason it's not working for nested constraintLayouts.

    I didn't find much resources online for extending viewGroups, and I'm having trouble understanding the very basic of things, e.g. MeasureSpec, where everyone says that it is the constraint imposed by the parent to it's children, but, is the parent the view we're extending or the viewGroup that holds the viewGroup we're extending? If the MeasureSpec is referring to the parent's specs, then would getPadding also get the padding of the parent of the ViewGroup we're extending?

    If possible please answer my above confusions and give me hints to how I should go about making the kind of view I have described above.
     


Loading...

Share This Page

Loading...