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

Views are too small #5

Open
fadelakin opened this issue Aug 20, 2015 · 4 comments
Open

Views are too small #5

fadelakin opened this issue Aug 20, 2015 · 4 comments

Comments

@fadelakin
Copy link

I noticed that even though the carousel is set to match parent, the view doesn't take up the entire screen space is confined to the middle of the screen and set height and width. Is there a way to reszie the carousel to actually fit the screen's width and height? Rather than the small space it currently contains? I noticed that in the sample app, this is done as well.

@applm
Copy link
Owner

applm commented Aug 21, 2015

You can implement onMeasure() method and set cover width and height to whatever you want.

@hy9be
Copy link

hy9be commented Nov 4, 2015

@applm could you give us an example? I tried to override the onMeasure() method but the views are still very small. The height is about 1/4 of the screen height. Could you point us to where the actual height is determined in your code? @fadelakin

@hy9be
Copy link

hy9be commented Nov 5, 2015

@fadelakin I figured out my issue. The width and height value used by the LayoutParams object is in pixel. You will need to convert your dp into px and then pass the values to the width and height property of the carousel.

Hope this helps.

@Abilashinamdar
Copy link

i have tried to set the width, height to 1000 as shown below in CoverFlowCarousel.java and also tried to set carousel.setMinimumWidth(1000); carousel.setMinimumHeight(1000);

@OverRide
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(1000, 1000);
}

both are not affecting result is same.

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

4 participants