android - PercentRelativeLayout not working -
i'm trying use percentrelativelayout obtain ratio widget. if updated dependecies, doesn't seem android studio recognize library.
here gradle
android { compilesdkversion 23 buildtoolsversion "23.0.3" defaultconfig { applicationid "com.cobaltsign.androidwidget" minsdkversion 21 targetsdkversion 23 versioncode 1 versionname "1.0" } buildtypes { release { minifyenabled false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' } }} dependencies { compile filetree(dir: 'libs', include: ['*.jar']) testcompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.4.0' compile 'joda-time:joda-time:2.9.3' compile 'com.squareup.picasso:picasso:2.5.2' compile 'com.google.android.gms:play-services-appindexing:9.0.2' compile 'com.makeramen:roundedimageview:2.2.1'} idea ?
you have import compile 'com.android.support:percent:23.3.0'
in build.gradle
. take @ example :
<android.support.percent.percentrelativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent"> <imageview app:layout_widthpercent="50%" app:layout_heightpercent="50%" app:layout_margintoppercent="25%" app:layout_marginleftpercent="25%"/>
Comments
Post a Comment