We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have made a custom sliderLayout in order to get the wanted aspect ratio, but unfortunately, the image will disappear completely.
my code:-
public class CustomSliderLayout extends SliderLayout {
public CustomSliderLayout(Context context) { super(context); } public CustomSliderLayout(Context context, AttributeSet attrs) { super(context, attrs); } public CustomSliderLayout(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); int width = getDefaultSize(getSuggestedMinimumWidth(), widthMeasureSpec); int height = (int) (width / 1.65); setMeasuredDimension(width, height); }
}
The text was updated successfully, but these errors were encountered:
you can use app:layout_constraintDimensionRatio and use constraint layout as parent of slider layout.
app:layout_constraintDimensionRatio
Sorry, something went wrong.
No branches or pull requests
I have made a custom sliderLayout in order to get the wanted aspect ratio, but unfortunately, the image will disappear completely.
my code:-
public class CustomSliderLayout extends SliderLayout {
}
The text was updated successfully, but these errors were encountered: