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

fixed inflate exception occured in ChapterRenderer.java #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,16 @@
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import butterknife.ButterKnife;
import butterknife.InjectView;

import com.github.pedrovgs.effectiveandroidui.R;
import com.github.pedrovgs.effectiveandroidui.domain.tvshow.Chapter;
import com.pedrogomez.renderers.Renderer;

import javax.inject.Inject;

import butterknife.ButterKnife;
import butterknife.InjectView;

/**
* Renderer implementation for Chapter objects.
*
Expand Down Expand Up @@ -58,7 +61,7 @@ public void setPosition(int position) {
}

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

@Override public void render() {
Expand Down
42 changes: 42 additions & 0 deletions app/src/main/res/layout/row_chapter_2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/AppTheme.Chapter">

<!-- Chapter number -->

<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"/>

<!-- Chapter title -->

<TextView android:id="@+id/tv_chapter_title"
android:layout_toRightOf="@id/tv_chapter_number"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/secondary_margin"
android:layout_marginLeft="@dimen/main_margin"
android:textSize="@dimen/title_size"
android:textColor="@color/fourth_color"
android:singleLine="true"/>

<!-- Chapter publish date -->

<!--<item name="android:fontFamily">sans-serif-light</item>-->

<TextView android:id="@+id/tv_chapter_publish_date"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:fontFamily="sans-serif-light"
android:layout_marginLeft="@dimen/main_margin"
android:paddingBottom="@dimen/secondary_margin"
android:textColor="@color/fourth_color"
android:layout_toRightOf="@id/tv_chapter_number"
android:layout_below="@id/tv_chapter_title"/>

</RelativeLayout>
Copy link
Owner

Choose a reason for hiding this comment

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

Instead of creating a new layout why don't we update the original one? row_chapter.

19 changes: 10 additions & 9 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
# Project-wide Gradle settings.

# IDE (e.g. Android Studio) users:
# Settings specified in this file will override any Gradle settings
# configured through the IDE.

## Project-wide Gradle settings.
#
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html

#
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

#
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# org.gradle.parallel=true
#Mon Aug 29 16:39:35 CST 2016
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.