SimpleListView

Android Simple ListView

License

License

GroupId

GroupId

com.orhanobut
ArtifactId

ArtifactId

simplelistview
Last Version

Last Version

1.3
Release Date

Release Date

Type

Type

aar
Description

Description

SimpleListView
Android Simple ListView
Project URL

Project URL

https://github.com/orhanobut/simplelistview
Source Code Management

Source Code Management

https://github.com/orhanobut/simplelistview

Download simplelistview

How to add to project

<!-- https://jarcasting.com/artifacts/com.orhanobut/simplelistview/ -->
<dependency>
    <groupId>com.orhanobut</groupId>
    <artifactId>simplelistview</artifactId>
    <version>1.3</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/com.orhanobut/simplelistview/
implementation 'com.orhanobut:simplelistview:1.3'
// https://jarcasting.com/artifacts/com.orhanobut/simplelistview/
implementation ("com.orhanobut:simplelistview:1.3")
'com.orhanobut:simplelistview:aar:1.3'
<dependency org="com.orhanobut" name="simplelistview" rev="1.3">
  <artifact name="simplelistview" type="aar" />
</dependency>
@Grapes(
@Grab(group='com.orhanobut', module='simplelistview', version='1.3')
)
libraryDependencies += "com.orhanobut" % "simplelistview" % "1.3"
[com.orhanobut/simplelistview "1.3"]

Dependencies

compile (1)

Group / Artifact Type Version
com.android.support » appcompat-v7 jar 21.0.2

Project Modules

There are no modules declared in this project.

Android Arsenal API

simplelistview

Android simple listview by using linearlayout.

The problem

  • You need to add a few items and you don't want the scroll feature
  • You have a scrollview and you want to show a few items in the list as fully expanded

###Gradle

compile 'com.orhanobut:simplelistview:1.3@aar'

###Usage Either define in xml or dynamically. xml sample

<com.orhanobut.simplelistview.SimpleListView
    android:id="@+id/list"                     
    android:layout_width="match_parent"        
    android:layout_height="wrap_content"/>
Set header
listView.setHeaderView(R.layout.header);

or

listView.setHeaderView(view);
Set footer
listView.setFooterView(R.layout.footer);

or

listView.setFooterView(view);
Set divider
listView.setDividerView(R.layout.divider);
Set item click Listener
listView.setOnItemClickListener(new SimpleListView.OnItemClickListener() { 
    @Override                                                              
    public void onItemClick(Object item, View view, int position) {        
        //This special listener will return object for you                                                            
    }                                                                      
});
Set adapter
listView.setAdapter(adapter);
Refresh the listview
adapter.notifyDataSetChanged();

You might also like

  • Logger Simple,pretty and advanced logger
  • Hawk Secure simple key-value storage
  • Wasp All-in-one network solution
  • Bee QA/Debug tool
  • DialogPlus Easy,simple dialog solution

###License

Copyright 2014 Orhan Obut

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Versions

Version
1.3
1.2