Skip to content

Conversation

@wanyt
Copy link

@wanyt wanyt commented Aug 29, 2016

The pull request fixes the exception:

android.view.InflateException: Binary XML file line #32: Error inflating class <unknown>
                                                                                            at android.view.LayoutInflater.createView(LayoutInflater.java:620)
                                                                                            at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
                                                                                            at android.view.LayoutInflater.onCreateView(LayoutInflater.java:669)
                                                                                            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:694)
                                                                                            at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
                                                                                            at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
                                                                                            at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
                                                                                            at com.github.pedrovgs.effectiveandroidui.ui.renderer.chapter.ChapterRenderer.inflate(ChapterRenderer.java:64)

And the exception still occurs when I tested it in the Samsung GT-I8552. Although I fixed it, I don't know why. The exception occurred in ChapterRenderer.java:

@Override protected View inflate(LayoutInflater layoutInflater, ViewGroup viewGroup) {
    return layoutInflater.inflate(R.layout.row_chapter, viewGroup, false);
  }

I thought maybe row_chapter.xml causes the crash, and I created a file named row_chapter_2.xml. Then, I put the attribute copy from styles-chapter.xml to row_chapter_2.xml. like below:

<TextView android:id="@+id/tv_chapter_number"
      android:layout_alignParentLeft="true"
      android:layout_centerVertical="true"
      style="@style/AppTheme.Chapter.Number"/>

replaced by

<TextView android:id="@+id/tv_chapter_number"
        android:layout_alignParentLeft="true"
        android:layout_centerVertical="true"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textColor="@color/sixth_color"
        android:textSize="@dimen/numeric_title_size"
        android:layout_marginLeft="@dimen/secondary_margin"/>

And the crash is solved. Do you know the reason?

systemProp.http.proxyPassword=yEdd_yqhn
systemProp.http.proxyHost=103.37.156.196
systemProp.http.proxyUser=duotai
systemProp.http.proxyPort=11662
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes are not needed.

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

Successfully merging this pull request may close these issues.

2 participants