Using the Android Percent Support Library, how can I set the width of an ImageView to a percentage of its containing PercentRelativeLayout, while scaling the height in such a way as to maintain the original aspect ratio?
how to set ImageView width using Percent support lib and maintain aspect ratio?
1k Views Asked by Andy Dennie At
1
There are 1 best solutions below
Related Questions in ANDROID
- Delay in loading Html Page(WebView) from assets folder in real android device
- MPAndroidChart method setWordWrapEnabled() not found
- Designing a 'new post' android activity
- Android :EditText inside ListView always update first item in the listview
- Android: Transferring Data via ContentIntent
- Wrong xml being inflated android
- AsyncTask Class
- Unable to receive extras in Android Intent
- Website zoomed out on Android default browser
- Square FloatingActionButton with Android Design Library
- Google Maps API Re-size
- Push toolbar content below statusbar
- Android FragmentPagerAdapter Circular listview
- Layout not shifting up when keyboard is open
- auDIO_OUTPUT_FLAG_FAST denied by client can't connect to localhost
Related Questions in ANDROID-LAYOUT
- Push toolbar content below statusbar
- Java Heap Space error on Layout xml: GC overhead limit exceeded
- I want to Show Simple Toast Message When User Click On Media Controller button Pause/Start/Stop in video View Using Media Controller
- setBackground null pointer exception
- Show two activities simultaneously
- IllegalArgumentException:No view found for id
- Setting views dynamically with LayoutParams.addRule setting to the last position of the view
- Spinner Dropdown Arrow
- CoordinatorLayout, AppBarLayout and ToolBar - Toolbar doesn't scroll off the screen
- Is there a way to restrict the motion of an image view while dragging?
- Android ui with complex layout
- I have added 4 radio buttons but I cant find my radio group as i need its id
- crop bitmap in screen size from custom width
- Tool_Bar with android CardView and Transparent status bar
- Two views with same elevation side-by-side
Related Questions in ANDROID-PERCENTRELATIVELAYOUT
- ImageView set within PercentRelativeLayout won't show up
- DialogFragment with PercentRelativeLayout
- How to mantain uniform alignment in layout
- Android: unable to set background drawable color to percentRelativeLayout
- ImageView expanding container despite adjustViewBounds
- child view in percent relative layout visibility change
- TopMarginPercent in PercentRelativeLayout behaves strangely in nested Views
- Android PercentRelativeLayout `aspectRatio` and Implicit Height
- How to use PercentRelativeLayout in API 25
- Using PercentRelativeLayout specifying only width (heigh auto)
- Android PercentRelativeLayout width won't change with ratio when layout changed
- How to use PercentRelativeLayout in a CollapsingToolbarLayout?
- Android PercentRelativeLayout in a ListView shows nothing
- Android PercentRelativeLayout width and height should be specified
- Android - ScrollView and PercentRelativeLayout
Related Questions in ANDROID-PERCENT-LIBRARY
- Percentage library not working properly
- is there possible to give marginTop as much as views height at xml?
- PercentFrameLayout: You must supply a layout_width attribute
- Can ConstraintLayout perform the same effect like PercentLayout?
- Switch element not centre aligning horizontally within allocated space
- Using PercentRelativeLayout specifying only width (heigh auto)
- Replacement for the linearLayout weights mechanism
- Android PercentRelativeLayout width and height should be specified
- Installation of the com:android:support:percent:22.2.1 library fails in Android Studio
- PercentRelativeLayout behaves differently on Android M
- Fix Layout issue
- PercentRelativeLayout, how to set the height programmatically
- Missing XML resource type for PercentRelativeLayout Percentage value?
- how to set ImageView width using Percent support lib and maintain aspect ratio?
- Android Animations on Percent Library
Related Questions in PERCENT-SUPPORT-LIBRARY
- PercentSupportLibrary : Set percentage values in xml?
- What is minSDK for Percent Support Library?
- how to set ImageView width using Percent support lib and maintain aspect ratio?
- Assign percentage to PercentFrameLayout with databinding
- How to divide space equally among odd number of views in a layout using support percent library?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I got this to work with version 23.0.0 support lib: