Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In the fast switch when fragment, use it (multiStateView.setViewState (STATE_LOADING))) being given. #16

Closed
dreamlivemeng opened this issue Feb 7, 2017 · 4 comments

Comments

@dreamlivemeng
Copy link

                                                                         android.content.res.Resources$NotFoundException: Resource ID #0x0
                                                                               at android.content.res.Resources.getValue(Resources.java:1259)
                                                                               at android.content.res.Resources.loadXmlResourceParser(Resources.java:2666)
                                                                               at android.content.res.Resources.getLayout(Resources.java:1075)
                                                                               at android.view.LayoutInflater.inflate(LayoutInflater.java:412)
                                                                               at me.xdj.view.MultiStateView.setViewState(MultiStateView.java:87)
                                                                               at me.xdj.view.SimpleMultiStateView.setViewState(SimpleMultiStateView.java:79)
                                                                               at me.xdj.view.SimpleMultiStateView$1.run(SimpleMultiStateView.java:24)
                                                                               at android.os.Handler.handleCallback(Handler.java:739)
                                                                               at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                               at android.os.Looper.loop(Looper.java:155)
                                                                               at android.app.ActivityThread.main(ActivityThread.java:5721)
                                                                               at java.lang.reflect.Method.invoke(Native Method)
                                                                               at java.lang.reflect.Method.invoke(Method.java:372)
                                                                               at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1029)
                                                                               at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:824)
@Kennyc1012
Copy link
Owner

Can you post code of your XML file

@dreamlivemeng
Copy link
Author

<me.xdj.view.SimpleMultiStateView
            android:id="@+id/multi_state_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:gravity="center"
            xdj:msv_emptyView="@layout/view_empty_state_appoint_patient_list"
            xdj:msv_failView="@layout/view_fail_state"
            xdj:msv_loadingView="@layout/view_loading_state">

            <RelativeLayout
                android:id="@+id/main_subject_f_appoint_rl"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@color/white"
                android:layout_margin="@dimen/margin_normal"
                android:padding="@dimen/margin_normal">

                <TextView
                    android:id="@+id/main_subject_f_appoint_label_tv"
                    style="@style/text_size3_black"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="今日预约患者人数" />

                <TextView
                    android:id="@+id/main_subject_f_appoint_num_tv"
                    style="@style/text_size1_blue"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_below="@id/main_subject_f_appoint_label_tv"
                    android:layout_centerHorizontal="true"
                    android:textSize="88sp"
                    android:text="" />

            </RelativeLayout>
        </me.xdj.view.SimpleMultiStateView>

@Kennyc1012
Copy link
Owner

This looks like it is unable to find the layout resource for the given view state

@Kennyc1012
Copy link
Owner

I noticed that you have an error in your XML, xdj:msv_failView should be xdj:msv_errorView

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

No branches or pull requests

2 participants