I am a Android developer from China(My English sucks...).
I want to make effect like figure 1: A FrameLayouts width and height is both 50% of the screen width,contains an ImageView. The ImageViews width and height is both 50% of the FrameLayout.
I have made it by using PercentLayout,but I want to use constraintLayout to achieve the same effect.How should I do?
Can ConstraintLayout perform the same effect like PercentLayout?
231 Views Asked by Scott Su At
1
There are 1 best solutions below
Related Questions in JAVA
- Add image to JCheckBoxMenuItem
- How to access invisible Unordered List element with Selenium WebDriver using Java
- Inheritance in Java, apparent type vs actual type
- Java catch the ball Game
- Access objects variable & method by name
- GridBagLayout is displaying JTextField and JTextArea as short, vertical lines
- Perform a task each interval
- Compound classes stored in an array are not accessible in selenium java
- How to avoid concurrent access to a resource?
- Why does processing goes slower on implementing try catch block in java?
- Redirect inside java interceptor
- Push toolbar content below statusbar
- Animation in Java on top of JPanel
- JPA - How to query with a LIKE operator in combination with an AttributeConverter
- Java Assign a Value to an array cell
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-CONSTRAINTLAYOUT
- How ignore ConstraintLayout padding in children element
- ConstraintLayout aspect ratio
- How to Create smaller Button in Constraint Layout
- ConstraintLayout shows bad layout on preview even though on blueprint is ok
- Android constraint layout cuts off the text in textview
- Margins on children of ConstraintLayout do not display?
- Convert LinearLayout to ConstraintLayout issue
- Removing/Editing a constraint of a view inside a ConstraintLayout programmatically
- Constraint layout's width and height attributes automatically reset to 0dp
- How do I create a constraint layout programmatically
- Why even using requestLayout() after expanding view the textViews overlap each other in ConstrainLayout?
- Bad lag in Android Studio Visual Layout Editor
- ConstraintLayout drawing order/layer order
- Android Constraint Layout onMeasure not seeing soft Keyboard
- how to MODIFY a constraint layout programmatically?
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
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?


Try this: