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

Item Width #21

Open
shirishph opened this issue Feb 21, 2015 · 1 comment
Open

Item Width #21

shirishph opened this issue Feb 21, 2015 · 1 comment

Comments

@shirishph
Copy link

This is not an issue as such. I realize that width of items is fixed. Is it possible to reduce the default width of items at run time? I can see 3 items on my device, but would like to show at least 6 small text items (each 3-5 chars at most). I looked at the code, but could not find where changes need to be made. Do I need to look at "child.getMeasuredWidth()"? Any help would be most welcome. TIA.

@littlezan
Copy link

look at CustomArrayAdapter.java

mInflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = mInflater.inflate(R.layout.custom_data_view, parent, false);

change you convertView like this, it will be OK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants