Skip to content
This repository has been archived by the owner on Jul 11, 2024. It is now read-only.

the master version can`t support API below Level 11 #95

Open
zhanglt1986 opened this issue Sep 9, 2013 · 13 comments
Open

the master version can`t support API below Level 11 #95

zhanglt1986 opened this issue Sep 9, 2013 · 13 comments

Comments

@zhanglt1986
Copy link

getMeasuredState() and MEASURED_STATE_TOO_SMALL are used in ViewFlow.java ,
they are only support API level 11 and above.

@adouggy
Copy link

adouggy commented Sep 17, 2013

Yes, thanks. it works for me. default version from master is android 2.2 which make compile failed with hint getMeasuredState.

@guanguodong999
Copy link

Thanks , see this anwser . issue is solved.

@yolapop
Copy link

yolapop commented Nov 11, 2013

Excuse me, what was the solution?

@guanguodong999
Copy link

oh,sorry,just saw. In your project,

bonne chance!

ÔÚ 2013-11-11 19:40:05£¬Yolapop [email protected] дµÀ£º

Excuse me, what was the solution?

¡ª
Reply to this email directly or view it on GitHub.

@ghost
Copy link

ghost commented Nov 14, 2013

What was the solution? I don't see anything between "in your project" and "bonne chance".

@guanguodong999
Copy link

That is a image between "in your project" and "bonne chance".
please check the enclosure.
eclipse -> viewflow-> project.properties
target = android-17


please check your project .perhaps your name of project.properties file is below API 11.
If you don't solve , you can email , and attach the screenshot.
email : [email protected]
ÔÚ 2013-11-15 07:31:40£¬"Charles Neveu" [email protected] дµÀ£º

What was the solution? I don't see anything between "in your project" and "bonne chance".

¡ª
Reply to this email directly or view it on GitHub.

@Venni27
Copy link

Venni27 commented Dec 25, 2013

Does it mean that the min sdk level is 11 now?

1 similar comment
@siwangqishiq
Copy link

Does it mean that the min sdk level is 11 now?

@atest1
Copy link

atest1 commented Mar 19, 2014

branch:recyclebin is OK with API Level 8.

@ghost
Copy link

ghost commented Jun 18, 2014

in ViewFlow.java function onMeasure()

replace
childState = child.getMeasuredState();

with
childState = child.MEASURED_HEIGHT_STATE_SHIFT >> child.MEASURED_STATE_MASK;

@Gurvinder1406
Copy link

Thanks a ton @PhilippEmmermacher
Can you please briefly explain what exactly was the issue ?

@ghost
Copy link

ghost commented Jul 17, 2014

@Gurvinder1406

The function getMeasuredState() was introduced in API 11.
This means it cannot be used in API's below Level 11.

But if you look at its documentation (http://developer.android.com/reference/android/view/View.html#getMeasuredState%28%29) you will easily notice what the function does:

"Return only the state bits of getMeasuredWidthAndState() and getMeasuredHeightAndState(), combined into one integer. The width component is in the regular bits MEASURED_STATE_MASK and the height component is at the shifted bits MEASURED_HEIGHT_STATE_SHIFT>>MEASURED_STATE_MASK. "

@ghost
Copy link

ghost commented Dec 25, 2014

thanks a lot @PhilippEmmermacher that worked perfectly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants