Android: Multiple Sceen layout API -


i want make sure i'm understanding method setup multiple screen.

i want make app runnable api 8-21.

so far, implemented smallest-width differentiate multiple screen. works in emulator when use api 17, crashes when use api 8. realized smallest-width works api 13 , above.

so now, think next step create layout-small, layout-normal, etc. , adjust them.

is correct way tackle problem?

edit***********

here's logcat error filter, let me know if need post other:

11-19 05:28:37.769: e/androidruntime(276): fatal exception: main 11-19 05:28:37.769: e/androidruntime(276): java.lang.runtimeexception: unable start activity componentinfo{com.nah.ace/com.nah.ace.mainactivity}: android.content.res.resources$notfoundexception: resource id #0x7f030018 11-19 05:28:37.769: e/androidruntime(276):  @ android.app.activitythread.performlaunchactivity(activitythread.java:2663) 11-19 05:28:37.769: e/androidruntime(276):  @ android.app.activitythread.handlelaunchactivity(activitythread.java:2679) 11-19 05:28:37.769: e/androidruntime(276):  @ android.app.activitythread.access$2300(activitythread.java:125) 11-19 05:28:37.769: e/androidruntime(276):  @ android.app.activitythread$h.handlemessage(activitythread.java:2033) 11-19 05:28:37.769: e/androidruntime(276):  @ android.os.handler.dispatchmessage(handler.java:99) 11-19 05:28:37.769: e/androidruntime(276):  @ android.os.looper.loop(looper.java:123) 11-19 05:28:37.769: e/androidruntime(276):  @ android.app.activitythread.main(activitythread.java:4627) 11-19 05:28:37.769: e/androidruntime(276):  @ java.lang.reflect.method.invokenative(native method) 11-19 05:28:37.769: e/androidruntime(276):  @ java.lang.reflect.method.invoke(method.java:521) 11-19 05:28:37.769: e/androidruntime(276):  @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:868) 11-19 05:28:37.769: e/androidruntime(276):  @ com.android.internal.os.zygoteinit.main(zygoteinit.java:626) 11-19 05:28:37.769: e/androidruntime(276):  @ dalvik.system.nativestart.main(native method) 11-19 05:28:37.769: e/androidruntime(276): caused by: android.content.res.resources$notfoundexception: resource id #0x7f030018 11-19 05:28:37.769: e/androidruntime(276):  @ android.content.res.resources.getvalue(resources.java:892) 11-19 05:28:37.769: e/androidruntime(276):  @ android.content.res.resources.loadxmlresourceparser(resources.java:1869) 11-19 05:28:37.769: e/androidruntime(276):  @ android.content.res.resources.getlayout(resources.java:731) 11-19 05:28:37.769: e/androidruntime(276):  @ android.view.layoutinflater.inflate(layoutinflater.java:318) 11-19 05:28:37.769: e/androidruntime(276):  @ android.view.layoutinflater.inflate(layoutinflater.java:276) 11-19 05:28:37.769: e/androidruntime(276):  @ android.support.v7.app.actionbaractivitydelegatebase.setcontentview(actionbaractivitydelegatebase.java:228) 11-19 05:28:37.769: e/androidruntime(276):  @ android.support.v7.app.actionbaractivity.setcontentview(actionbaractivity.java:102) 11-19 05:28:37.769: e/androidruntime(276):  @ com.nah.ace.mainactivity.oncreate(mainactivity.java:18) 11-19 05:28:37.769: e/androidruntime(276):  @ android.app.instrumentation.callactivityoncreate(instrumentation.java:1047) 11-19 05:28:37.769: e/androidruntime(276):  @ android.app.activitythread.performlaunchactivity(activitythread.java:2627) 11-19 05:28:37.769: e/androidruntime(276):  ... 11 more 

also add default layout folder empty. under api8, seems it's trying load off folder, instead of layout-sw-320dpi, reason crash. tested on api17+api21 , loads off layout-sw-320dpi fine.

edit2: seems work on api16+.

edit3: manifest's sdk:

android:minsdkversion="8"

android:targetsdkversion="21"

no , problem caused due java class not xml files can assume point.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -