android


Android rendering problems, Percent layout


I'm trying to implement the percent relative layout, and I'm following this tutorial:
https://blog.stylingandroid.com/percent-part-1/
There doesn't seem to be any errors in my code, but there's still no preview, and it says:
"Rendering problems
Exception raised during rendering: android/support/percent/R$stylable"
Any idea what's wrong?
My dependencies from 'build.gradle (Module:app)' are:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:24.0.0-alpha1'
compile 'com.android.support:percent:23.0.0'
}
The two on the top were there from the beginning.
My XML file:
<android.support.percent.PercentRelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_paddingRightPercent="2%"
app:layout_paddingLeftPercent="2%"
app:layout_paddingBottomPercent="2%"
tools:context="companyname.appname.SeLister">
<TextView android:text="Reklame"
app:layout_heightPercent="10%"
app:layout_widthPercent="50%"
android:id="#+id/listereklame"
android:textColor="#000000"
android:background="#drawable/tekstboks1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16dp"
/>
</android.support.percent.PercentRelativeLayout>
I think I solved it. Remove the padding attributes from the initialization tag. Hopefully, this will be of help to others with the same problem, cheers!

Related Links

How to centralize a custom toast creation
how to reroute all IP traffic (pref. at the network layer) in Android 3.x
Android GalleryView Recycling
Start Activity with ACTION_EDIT and passing LOOKUP_KEY causes NumberFormatException
GPS observational error on MapView
android XML scrollview and linear layout problem
Copying files from adb to window
Reasonable texture sizes in android
Best approach to be notified when a preference value has been reached
Android/Eclipse Installation on Ubuntu 11.04 - aapt and adb not working properly
HTML Input Field: Automatically display numeric input method
Making A Custom Skinny ProgressBar / Seekbar
Why do we need Paint to draw an integer array of colors as a bitmap in android?
Show notification on status bar for media player in android
Launching a long running task from an AlertDialog (Android)
how to make gif image by two bitmaps in android

Categories

HOME
service-worker
asp.net-web-api
fabricjs
scikit-learn
jax-rs
hugo
regular-language
python-multithreading
recordrtc
google-schemas
android-securityexception
azure-powershell
foreign-keys
squashfs
parcelable
pchart
mongoid6
intersystems-cache
tpm
gp
scrollview
complex-numbers
hibernate-validator
playstation-portable
catch-unit-test
papaparse
hard-drive
pdw-file-browser
slacktextviewcontroller
least-squares
processwire
imx6
apiary.io
google-knowledge-graph
typesafe-config
movilizer
angular-http
apache-spark-dataset
ovf
openrasta
singleinstance
opengl-4
jqchart
baidu
choice
jboss-tools
aurora
grass
invoke-sqlcmd
piracy-prevention
spring-retry
sciruby
cgi-bin
finalbuilder
atoi
pyobjc
ansi
deform
lambda-architecture
kissfft
grails-domain-class
dsym
android-audiorecord
code-duplication
flex++
diem
actiondispatch
windows-98
intersect
tree-balancing
nokia-s40
cakephp-1.2
correlated-subquery
thttpd
infobright
virtualpathprovider
box2d-iphone
undefined-index
load-time
ie-compatibility-mode
updatesourcetrigger
maven-1
office-2007
ajax-polling
folding
mathematical-notation
lemmatization

Resources

Encrypt Message