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

if the header like this android:layout_height="wrap_content" #10

Closed
xiaogu-space opened this issue May 27, 2015 · 3 comments
Closed

if the header like this android:layout_height="wrap_content" #10

xiaogu-space opened this issue May 27, 2015 · 3 comments

Comments

@xiaogu-space
Copy link

the textview's height is changged ,how can i use it?

@noties
Copy link
Owner

noties commented Jun 4, 2015

@gushoubang Well, try wrapping TextView in a ViewGroup with fixed height or set TextView's height to some dimen. gravity="center" will center text inside TextView.

@xiaogu-space
Copy link
Author

Well,I want to use ImageView instead of Textview,but the picture come from the net,I do not know the height.

@noties
Copy link
Owner

noties commented Jun 4, 2015

I guess, that simplest solution would be setting fixed height for your ImageView & setting scaleType="centerCrop". That way image would stretch to ImageView's bounds.
But if there is a need for pixel-perfect image displaying I would recommend obtaining a Bitmap & updating ImageView's layoutParams.height & ScrollableLayout.setMaxScrollDistance()

@noties noties closed this as completed Jun 17, 2015
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