Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rounded Edges on a Button #122

Open
uksa opened this issue May 24, 2016 · 0 comments
Open

Rounded Edges on a Button #122

uksa opened this issue May 24, 2016 · 0 comments

Comments

@uksa
Copy link

uksa commented May 24, 2016

I've been unable to set rounded edges on a button with st.corner_radius. So I've trued using the method suggested here:

http://stackoverflow.com/questions/9334618/rounded-button-in-android

In the folder resources/drawable/rounded_button.xml

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
       android:shape="rectangle" android:padding="10dp">
  <corners
          android:bottomRightRadius="10dp"
          android:bottomLeftRadius="10dp"
          android:topLeftRadius="10dp"
          android:topRightRadius="10dp"/>
</shape>

I've added the background to RMQStyler

  def background=(background)
    @view.background = background
  end

So in my stylesheet I now have the reference:
st.background = RMQResource.find('drawable', 'rounded_button')

One build the app crashes, with no stack-trace. Is this an RubyMotion error with Android or have I done something really screwy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant