frakbot / FWeather

A weather widget for Android based upon Tobias van Scheider's Authentic Weather design.
https://play.google.com/store/apps/details?id=net.frakbot.FWeather
92 stars 34 forks source link

IllegalStateException for low-end devices #115

Closed frapontillo closed 10 years ago

frapontillo commented 10 years ago

The app force closes itself (probably when searching for a custom location) on low end-devices.

java.lang.IllegalStateException: ActionBarView can only be used with android:layout_width="match_parent" (or fill_parent)
at com.actionbarsherlock.internal.widget.ActionBarView.onMeasure(ActionBarView.java:814)
at android.view.View.measure(View.java:8313)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:250)
at com.actionbarsherlock.internal.widget.ActionBarContainer.onMeasure(ActionBarContainer.java:181)
at android.view.View.measure(View.java:8313)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1017)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:386)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:309)
at android.view.View.measure(View.java:8313)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:250)
at android.view.View.measure(View.java:8313)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3138)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:250)
at android.view.View.measure(View.java:8313)
at android.view.ViewRoot.performTraversals(ViewRoot.java:845)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1865)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
at dalvik.system.NativeStart.main(Native Method)

See https://github.com/JakeWharton/ActionBarSherlock/issues/812.

rock3r commented 10 years ago

If we drop support for Android 2.3 we can get rid of ABS and close this issue. What do you think, @frapontillo? Just looked at the Play Store stats, we cover ~96% of our user base by going #minSdkLevel15.

rock3r commented 10 years ago

Dropping support for ABS in 3.0, this has become obsolete.

AndroidDeveloperLB commented 10 years ago

@rock3r so is there a solution? Google's support library still lacks some features that ABS has (like support for preferenceActivity and PreferenceFragment), so I can't use their library yet...

rock3r commented 10 years ago

minSdk15 is the way

frapontillo commented 10 years ago

Agreed, sorry for missing it earlier this month.

AndroidDeveloperLB commented 10 years ago

@rock3r any other solution, that will still allow to handle older Android versions? does the official google library have this issue too?

rock3r commented 10 years ago

Don't know. And honestly, I don't care either, because it's time to push for ICS and up only. I don't want to waste time on supporting 4% of the users that are too lazy or cheap to get a decent device. A Moto E is cheap and good enough for not having any excuse not to be on 15+ (or even 16+, but I'm fine with 15 for now).

frapontillo commented 10 years ago

Without being too harsh on end users, we need to start pushing manufacturers to get their shit right. I am yet to see a Moto E or G in ordinary stores, btw.

rock3r commented 10 years ago

You're in (Southern) Italy dude. It's pretty different over here lol (and yet there's a lot of people I know in Italy that has a moto G)