i am implementing a listview in android which will look exactly like this and scroll
I have been doing this by setting the layout params of inflated rows in getView of my adapter but the issue which arrises due to this is that the list-view becomes jerky. i.e. it only updates the rows when one row has completely passed from screen and getView has been called giving new params to all visible rows resulting in jerks can animation be applied and can listview scroll position be preciesly taken. what i want is a smooth transition between views i.e. as the listview moves up even a little bit the inner views should scale precisely with that movement.
This was my first level implementation to solve this problem hope it helps anyone interested, The arrHeight and arrWidth are created dynamically on activity start using Bezier Path Algorithm
public class TimelinePinsAdapter extends ParentLazyAdapter {
LinearLayout ll_PinsContainer;
LinearLayout.LayoutParams llParams_PinParameters;
public TimelinePinsAdapter(Activity a, ArrayList<HashMap<String, String>> d) {
super(a, d);
}
public int getCount() {
return data.size();
}
public Object getItem(int position) {
return position;
}
public long getItemId(int position) {
return position;
}
public View getView(int position, View convertView, ViewGroup parent) {
vi = convertView;
if (convertView == null)
vi = inflater.inflate(R.layout.rowsinflate, null, false);
ll_PinsContainer = (LinearLayout) vi.findViewById(R.id.item);
llParams_PinParameters =
new LinearLayout.LayoutParams(0,
(int) TimeLineActivity.arrHeight[position % 7]);
ll_PinsContainer.setLayoutParams(llParams_PinParameters);
return vi;
}
}