0

I've been trying a couple of times and tried different libraries (thought that problems lies there) and every time getting Rendering problems:

Rendering problem

This problem occurs when I try indicate that the listview is now a LoadMoreListView like in this guide of library.

in layout/fragment_main.xml file:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context=".MainActivity$PlaceholderFragment">

<TextView
    android:id="@+id/section_label"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" />

<com.costum.android.widget.LoadMoreListView
    android:id="@+id/android:list"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" />
</RelativeLayout>

I have already tried different guides (this, this and this) and every time I'm getting these rendering problems.


How I did import:

So I put library into app/libraries/'library here':

enter image description here

Settings.gradle file:

include ':app'
include ':app:libraries:pulltorefresh-and-loadmore'

and in app/build.gradle file added dependency:

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:19.+'
compile project('libraries:pulltorefresh-and-loadmore')
}

This project in github if needed..

What am I doing wrong? Thanks in advance.

Community
  • 1
  • 1
AnZyuZya
  • 201
  • 1
  • 3
  • 18

1 Answers1

0

You should be getting a compile error when you build the project. The path you specify in the compile project statement must be the same as in your settings.gradle file. Change this:

compile project('libraries:pulltorefresh-and-loadmore')

to this:

compile project('app:libraries:pulltorefresh-and-loadmore')
Scott Barta
  • 79,344
  • 24
  • 180
  • 163