我想动态添加视图切换器。Android - 视图切换器
ViewSwitcher switcher = new ViewSwitcher(this);
如何将两个布局添加到视图切换器并使用代码切换视图?
错误:
A1 [Android Application]
DalvikVM[localhost:8604] (may be out of synch)
Thread [<1> main] (Suspended (exception RuntimeException))
ActivityThread.performLaunchActivity(ActivityThread$ActivityClientRecord, Intent) line: 1815
ActivityThread.handleLaunchActivity(ActivityThread$ActivityClientRecord, Intent) line: 1831
ActivityThread.access$500(ActivityThread, ActivityThread$ActivityClientRecord, Intent) line: 122
ActivityThread$H.handleMessage(Message) line: 1024
ActivityThread$H(Handler).dispatchMessage(Message) line: 99
Looper.loop() line: 132
ActivityThread.main(String[]) line: 4123
Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method]
Method.invoke(Object, Object...) line: 491
ZygoteInit$MethodAndArgsCaller.run() line: 841
ZygoteInit.main(String[]) line: 599
NativeStart.main(String[]) line: not available [native method]
Thread [<8> Binder Thread #2] (Running) (may be out of synch)
Thread [<7> Binder Thread #1] (Running) (may be out of synch)
Thread [<9> SoundPool] (Running) (may be out of synch)
Thread [<10> SoundPoolThread] (Running) (may be out of synch)
你能在这里添加一些代码。还需要一些更多的日志记录,因为这种异常似乎是实际异常的结果。 – Ronnie