ssomai / ScalableLayout

Scalable Layout For Android
Apache License 2.0
270 stars 87 forks source link

set widhth and height to Match parent #46

Open saffull opened 7 years ago

saffull commented 7 years ago

ScalableLayout sl = new ScalableLayout(this, 400, 200);

here how can i make the 400,600 to match parent if the scalable layout is inside a linear Layout..?

ssomai commented 7 years ago

Um... May I pardon me? What is the 400,600?

Anyway, ScalableLayout must have just one 'match_parent' between width and height of its LayoutParams. Because ScalableLayout has the aspect ratio of width, height (ex. 400,200).