Questions tagged [android-percent-library]

The Percent package provides APIs to support adding and managing percentage based dimensions in your app.

The Percent Support library adds support for the PercentLayoutHelper.PercentLayoutParams interface and various classes, such as PercentFrameLayout and PercentRelativeLayout.

24 questions
1
vote
1 answer

Extra margin in RelativeLayout

I'm using Support Android Percentage Library's RelativeLayout AKA android.support.percent.PercentRelativeLayout but it has extra margin on the left edge same as RelaytiveLayout I didn't set any margin or padding but it's still has it, Search a lot…
1
vote
1 answer

Android PercentRelativeLayout width and height should be specified

I'm trying to use android.support.percent.PercentRelativeLayout:
1
vote
0 answers

Percentage library not working properly

I have an adapter class in which I have a layout
1
vote
2 answers

How can I set negative percent margins in PercentRelativeLayout?

I need to set negative margin in PercentRelativeLayout but when I try it in xml as follows it doesn't work. app:layout_marginTopPercent="-10%" I tried setting negative margin programmatically when parent is measured but PercentRelativeLayout…
0
votes
1 answer

Can ConstraintLayout perform the same effect like PercentLayout?

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. …
0
votes
1 answer

PercentageRelativeLayout left margin is incorrect

My buttons get pushed to the left way too much (not 33% and 66% respectively,as well as not 50% for the first one): Screenshot This happens in the emulator as well. I am currently testing this on a OnePlus One. Here is the PercentageRelativeLayout…
0
votes
2 answers

How to divide space equally among odd number of views in a layout using support percent library?

I am using support percent library in my project. compile 'com.android.support:percent:23.1.0' I have three ImageViews in a LinearLayout which are supposed to take the space equally (in horizontal direction). But since percent support library has…
0
votes
3 answers

Fix Layout issue

Scenario: I've four buttons arranged Relative Layout. These button's text varies through the app life which makes button shrink or expand according to text length. Using: RelativeLayout.getChildAt().setText(); Q1) But I require the each button to…
0
votes
1 answer

is there possible to give marginTop as much as views height at xml?

I have one imageView and I am trying to give it minus margin top as much as its height / 2. I can do it at programmatically but i wondred is it possible at xml also andorid published percentrelative layout . I don't know how to to do it or possible?
1
2