Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - How can I specify the default style of my widge

How can I specify the default style of my widge

General topics about the Android-Platform itself.
Coding issues please to the subforum right below.

How can I specify the default style of my widge

Postby silverburgh.meryl » Fri Feb 13, 2009 1:54 am

Hi,

I create my own widget with its own drawable for background.

So in my styles.xml file, I have this:
<resources>
<style name="MyWidget">
<item name="android:background">@drawable/btn_mywidget_bg</item>
</style>
</resources>

In my main.xml, if i specified my 'style' attribute, my background
drawable was displayed correctly.
<test.MyWidget android:id="@+id/mywidget" style="@style/MyWidget" />

but if I just do this:
<test.MyWidget android:id="@+id/mywidget" /> , the background drawable
is not display correctly.

Can you please tell me how can I specify the default style of my
widget so that I don't need to add style="@style/MyWidget" everytime I
use my widget?

Thank you.
silverburgh.meryl
Junior Developer
Junior Developer
 
Posts: 23
Joined: Sun Feb 08, 2009 11:17 pm

Top

Return to General

Who is online

Users browsing this forum: No registered users and 2 guests