I want to get the battery states by BatteryMangager and BroadReceiver. I can 
get Intent.ACTION_BATTERY_CHANGED event,but I don’t know how to process other 
action such as BatteryManager.BATTERY_PLUGGED_AC and so on. Who can give me 
advice ,thanks a lot.

愿祖国昌盛,愿人民平安!

--- 09年5月20日,周三, n5r11 <[email protected]> 写道:


发件人: n5r11 <[email protected]>
主题: [android-developers] Re: Is there an easy way to make EditText look like 
TextView but still behave like EditText?
收件人: "Android Developers" <[email protected]>
日期: 2009年5月20日,周三,上午8:19



I've tried all that you suggested, and nothing happens? EditText still
looks the same, both in IDE and when compiled on emulator.

<EditText
    style="?android:attr/textViewStyle"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="Neque porro quisquam est qui.dolorem.com ipsum" />

<EditText
    style="@android:style/Widget.TextView"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="Neque porro quisquam est qui.dolorem.com ipsum" />

I see I'm not the only one with this problem:
http://groups.google.rs/group/android-developers/browse_frm/thread/2913f29b7b065331/38f79498b2c28597?lnk=gst&q=Using+Widget.TextView.ListSeparator#38f79498b2c28597

n5r11

On 19 屑邪褬, 02:05, Jeff Sharkey <[email protected]> wrote:
> You should actually be using an attribute instead of a direct reference:
>
> style="?android:attr/textViewStyle"
>
> The underlying @style reference isn't public, but the above attr is.
>
> j
>
>
>
>
>
> On Mon, May 18, 2009 at 4:30 PM, MrSnowflake <[email protected]> wrote:
>
> > Might be: style="@android:style/Widget.TextView"
>
> > Otherwise, make a TextView and an EditText and change the GONE state
> > of them.
>
> > On 18 mei, 19:33, Raphael <[email protected]> wrote:
> >> Try this:
> >> 聽 聽 聽 聽 android:style="@android:style/Widget.TextView"
>
> >> R/
>
> >> On Sun, May 17, 2009 at 3:31 PM, Nikola Radosavljevic
>
> >> <[email protected]> wrote:
> >> > Note: I had troubles posting to android-beginners group, so I came here
> >> > hoping this will work.
> >> > Hello there,
>
> >> > I want an EditText to look like TextView but still behave like
> >> > EditText. I've tried applying TextView style to my EditText in my
> >> > layout.xml file, like this:
>
> >> > <EditText
> >> > 聽 聽 聽 聽android:id="@+id/lipsum"
> >> > 聽 聽 聽 聽android:text="Lorem ipsum"
> >> > 聽 聽 聽 聽android:style="@android:style/Widget_TextView"
> >> > />
>
> >> > ..but I get an error within xml editor: "Error: No resource found that
> >> > matches the given name (at 'style' with value '@android:style/
> >> > Widget_TextView')." It is strange because @android:style/
> >> > Widget_TextView definitively exists - I double checked it in code via
> >> > android.R.style.Widget_TextView. Another strange thing is that I don't
> >> > get android:style offered in the xml editor while typing? There is
> >> > android:id, android:text and everything else.. but not
> >> > android:style?!
>
> >> > Note: I consider the hard way (making EditText look like TextView) to
> >> > be: extending EditText and overriding it's onDraw method.
>
> >> >Nikolar
>
> >> > PS: Check out
> >> >http://developer.android.com/guide/topics/ui/themes.html#styles.
> >> > Why are id and style written without android: namespace?
>
> --
> Jeff Sharkey
> [email protected]




      ___________________________________________________________ 
  好玩贺卡等你发,邮箱贺卡全新上线! 
http://card.mail.cn.yahoo.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to