dinocore1 / devsmartlib-android Goto Github PK
View Code? Open in Web Editor NEWA Horizontal ListView for Android
Home Page: http://www.dev-smart.com/archives/34
A Horizontal ListView for Android
Home Page: http://www.dev-smart.com/archives/34
Hi,
I cloned this repostiory and imported in ADT Bundle, But i get error on LocationService.java ... that:
ILocationService cannot be resolved to a type
Any Idea what the problem is?
Hi,
I am trying to use Horizontal list view but it is causing memory leak.
Any guess where is the issue?
Thanks,
When i m doing fast scroll in HorizontalListView Then List view is stop working....
<com.devsmart.android.ui.HorizontalListView
android:id="@+id/listview_overlay"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#d4d4d4" />
Solve It Please
No matter what position the listview is in, getFirstVisiblePosition returns 0.
I'm getting 12 errors with the same type of error. Do I have something setup incorrectly in my IDE? Using Eclipse 3.7.2, Android SDK is updated, including V4 APIs, Windows 7 64 bit.
Description Resource Path Location Type
The method getBestLocation() of type new ILocationService.Stub(){} must override a superclass method LocationService.java /DevsmartAndroid/src/com/devsmart/android line 20 Java Problem
and
Description Resource Path Location Type
The method run() of type new Runnable(){} must override a superclass method HorizontalListView.java /DevsmartAndroid/src/com/devsmart/android/ui line 199 Java Problem
If i use scrollTo to the one of the last item mMaxX is not calculated properly. This causes problem in scrolling to right (it can't be fully scrolled)
Scrollbars & Edge Fading does not work.
I am using a layoutinflater to inflate an item whose xml specified exact width and height in dp. The problem is that the item is occupying the entire width of the listview.
Hi,
I have implemented Horizontal List view in to my application, It works great.
But I have encountered one problem which is
if child view's width exceeds from the screen width it shows the view till the screen size rest is cutoff from the screen.
any idea how to solve this problem
Thanks
Hi,
I have set the imageview size 70x70 and updating images using AsyncTask.
But as I start scrolling horizontal scroll view it hides few images image views and create white space between images.
Please suggest possible solution.
Thanks
Hi,
I'm trying to use context menu on your HorizontalListView but it doesn't seem to work:
AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo)item.getMenuInfo();
info is null.
Thanks for your component
I want to use a horizontal listview inside of listview.But DevsmartLib-Android can not use the function "setSelection" like listview.
I want the listview comes out in the middle position.
Thank you very much.
if you use onDataSetChange, the animation is disabled.
The reason is: you call initView() in onLayout, when onDataSetChanged was called!
in initView() it set the scroller to a new scroller. It is not needed to reset the scroller, you need a new Method for initView() in onLayout.
https://github.com/sephiroth74/HorizontalVariableListView
The view is flickered when we hold the button and scroll. When any movement is made by tapping the button the view is flickering. Looks like problem in handling the touch event in the dispatchTouchEvent not sure though.
I am adding row dynamically and wants to scroll to last added values.
For that i have tried all things like Scrollto,setselection and many other fundas. But never success.
So i request you to solve this issue
The width value of child view isn't equal with measure of WRAP_CONTENT on showing when scroll at some times.
Reason: get the child view from mRemovedViewQueue lead to use old layoutParam on addAndMeasureChild.
Solution:always get new layoutParam in addAndMeasureChild.
I think is better display that look as same as ListView except direction.
my code:
private void addAndMeasureChild(final View child, int viewPos) {
LayoutParams params = (LayoutParams) child.getLayoutParams();
params = new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
ViewGroup.LayoutParams.MATCH_PARENT);
addViewInLayout(child, viewPos, params, true);
int heightMeasureSpec = MeasureSpec.makeMeasureSpec(getMeasuredHeight(),
MeasureSpec.EXACTLY);
int childHeightSpec = ViewGroup.getChildMeasureSpec(heightMeasureSpec,
getPaddingTop() + getPaddingBottom(), params.height);
int childWidthSpec = MeasureSpec.makeMeasureSpec(
params.width > 0 ? params.width : 0, MeasureSpec.UNSPECIFIED);
child.measure(childWidthSpec, childHeightSpec);
}
there is no effect when press or click a item, expect could use system default effect
I want to center the child in horizontalListview but horizontal listview not taking wrap_content from xml. any suggestions?
I have HorizontalListview with imageview on its list item. and everything is working fine. but it flickers on scrolling. The problem arises when there is clickable item in list item. otherwise it is working perfect.
Plz implement this method for smooth scrolling instead of scrollTo(int X)...
If you scroll to a big distances for examle to right and lets say there will be 100 views to scroll all they will be created in the fillRight method without reusing already non visible views such as mRemovedViewQueue will be empty.
seems its working well, but if i want scroll i just cant, because change to the other "page" (or fragment)
The HorizontalListView does not respect the LayoutParams options for layout_height, forcing us to hardcode its height.
I know that the lack a view with "no center-locking" feature was one of the main reasons to start this project, but now with API 16 the Gallery widget was deprecated and this is one of the few widgets that can replace it. It's posible to add an optional center-lock feature to this widget so that view can replace the Gallery view with all its features?
Hi, can somebody provide steps to import the library to Android Studio? I have tried using VCS->Github feature but unfortunately haven't achieved anything.
the setSelection(int position) [ which is used to set the default selected position of the list] is not implemented
RemoteImageView is custom widget to handle webimage and do lazy loading and caching routine. It will show progress spinner during image loading and once finished, the actual image will be showed up. however I can't get any web image to load when i put the view within the list, not even progress spinner showed up (i only see the spinner for brief moment when doing quick scroll). I think there is internal issues here. Can you enlighten me on how to fix this?
gallery_layout:
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ignition="http://github.com/ignition/schema"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="2dp">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingBottom="5dp"
android:paddingLeft="8dp"
android:paddingTop="5dp"
android:text="Foods around here:"
android:textSize="16dp" />
<com.devsmart.android.ui.HorizontalListView
android:id="@+id/gallery_list"
android:layout_width="fill_parent"
android:layout_height="400dp" />
xmlns:ignition="http://github.com/ignition/schema"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:padding="4dp"
android:background="#fff" >
<com.github.ignition.core.widgets.RemoteImageView
android:id="@+id/img"
android:layout_width="400dp"
android:layout_height="280dp"
android:background="@color/dark_brown"
android:padding="2dp"
ignition:progressDrawable="@drawable/ic_launcher"
ignition:autoLoad="false"
ignition:errorDrawable="@drawable/icon"
ignition:defaultDrawable="@drawable/place_snacks"
android:scaleType="fitXY"/>
package com.test;
import android.app.Activity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import com.devsmart.android.ui.HorizontialListView;
import com.github.ignition.core;
public class HorizontalListViewDemo extends Activity {
@OverRide
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.gallery_layout);
HorizontialListView listview = (HorizontialListView) findViewById(R.id.gallery_list);
listview.setAdapter(mAdapter);
}
private static String[] url = new String[]{ "http://www.google.com.sg/logos/2012/vday12-res.png",
"http://www.google.com.sg/logos/2012/vday12-res.png",
"http://www.google.com.sg/logos/2012/vday12-res.png" };
private BaseAdapter mAdapter = new BaseAdapter() {
@Override
public int getCount() {
return url.length;
}
@Override
public Object getItem(int position) {
return null;
}
@Override
public long getItemId(int position) {
return 0;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View retval = LayoutInflater.from(parent.getContext()).inflate(R.layout.gallery_listentry, null);
RemoteImageView img = (RemoteImageView) retval.findViewById(R.id.img);
img.setImageUrl(url[position]);
img.loadImage();
return retval;
}
};
}
Compiling from Android Studio, am getting following run time exception.
I have added the following line in build.gradle
compile files('libs/devsmartlib.jar')
06-09 02:31:11.652 3923-3923/? E/dalvikvm: Could not find class 'com.devsmart.android.ui.HorizontalListView', referenced from method com.example.railalarm.MainActivity.onCreate
06-09 02:31:11.692 3923-3923/? E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.railalarm/com.example.railalarm.MainActivity}: android.view.InflateException: Binary XML file line #76: Error inflating class com.devsmart.android.ui.HorizontalListView
左右多滑动几次,item排列就乱了
In the changeList you've given a link to http://github.com/dinocore1/Android-Horizontal-ListView
This link is broken. Am I missing something?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.