joeli-wow / range-seek-bar

Automatically exported from code.google.com/p/range-seek-bar
0 stars 0 forks source link

Widget crashes my app #20

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Added the Test.java activity with the test.xml layout to my project
2. Ran the app on a real device

What is the expected output? What do you see instead?

I would hope to see the slider. Instead the app crashes without giving any 
error message on the LogCat window.

What version of the product are you using? On what operating system?
I am using Android SDK Tools 21.1 with version 17 of the API.

Original issue reported on code.google.com by g.barr...@gmail.com on 14 Mar 2013 at 11:08

Attachments:

GoogleCodeExporter commented 8 years ago
There are some mistakes in your code.

1. call "setContentView(R.layout.test)" at the beginning of "onCreate"
2. When creating the widget, don't pass "null" as context. Use "this".
3. give your layout an id.
4. use that id in "findViewById"

Attached are corrected versions of your sample code.

Original comment by tittel@kom.e-technik.tu-darmstadt.de on 14 Mar 2013 at 12:49

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks, it works now.

Original comment by g.barr...@gmail.com on 14 Mar 2013 at 4:20