HTC Hero Stocks Widget Scrolling Ticker functionality

by Jared » Thu, 26 Nov 2009 01:03:41 GMT


Sponsored Links
 I have an HTC Hero from Sprint in the US and was curious about the how
the Stocks HTC widget scrolls text like a ticker. It is only the 4x1
sized widget that scrolls quotes. As far as I know, homescreen widgets
can only use RemoteViews for the layout, which is limited to the
following layouts and widgets (from
 http://developer.android.com/guide/topics/appwidgets/index.html #CreatingLayout):

    * AbsoluteLayout
    * FrameLayout
    * LinearLayout
    * RelativeLayout
    * AnalogClock
    * Button
    * Chronometer
    * ImageButton
    * ImageView
    * ProgressBar
    * TextView
      Descendants of these classes are not supported.

I know that this could be done in an app with android.widget.scroller,
but that can't be used in a homescreen widget. Would this
functionality be specific to the Sense UI homescreen capabilities? I
guess, my main question is if this can be replicated for a standard
Android widget and if so how.

--



HTC Hero Stocks Widget Scrolling Ticker functionality

by Mark Murphy » Thu, 26 Nov 2009 01:14:56 GMT


 


Look at the android:marquee attribute on TextView, and see if that fits
your needs.

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://twitter.com/commonsguy 

Warescription: Three Android Books, Plus Updates, $35/Year

--


Sponsored Links


HTC Hero Stocks Widget Scrolling Ticker functionality

by Jared » Thu, 03 Dec 2009 05:53:02 GMT


 I have this already in my xml layout:

<TextView
        android:id="@+id/left_text_box_0"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:focusable="true"
        android:singleLine="true"
        android:ellipsize="marquee"
        android:marqueeRepeatLimit="marquee_forever"
/>

This marquee works if I scroll up with the trackball on my widget to
focus on the text. The only thing that I need to do now is find out
how to set the focus programatically in the code. For an Activity or
View, this can be done by using TextView.setSelected(true). For a
RemoteView though, you can't use findViewById to get the TextView
layout reference (For example: R.id.left_text_box0). Do you know a way
to do this for a RemoteView?

Here is another post describing the same thing I'm looking for:



HTC Hero Stocks Widget Scrolling Ticker functionality

by prashanth » Fri, 04 Dec 2009 01:12:08 GMT


  took ages for me to find a solution for this though it was hidden
somewhere in internet..
anyways the solution is to add the tag <requestFocus/> in your
textview:)

Eg:

<TextView
android:id="@+id/left_text_box_0"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="true"
android:singleLine="true"
android:ellipsize="marquee"
android:marqueeRepeatLimit="marquee_forever">
<requestFocus/>
</TextView>


On Dec 2, 9:52pm, Jared <jaredstock...@gmail.com> wrote:

--



Other Threads

1. future android wish list

a program that can import through white pages or such into all of my
contacts that dont have address associated with  all the phone numbers
i have in contacts

then (if possible now or in the future )let google navigtion navigate
you from curent location to contact address.    BEAUTIFUL......

if this is already done or available please let me know.

--

2. when will android 1,6 OTA IN SINGAPORE, WHY?

was wondering, who are the one release the android 1.6 in a region?
telecom? google?
by 3g? can i get it on wifi?

so when will it OTA in singapore

--

3. UK to US publisher account

4. need Beta testers for hobby Apple //e emulator for Android

5. sending email via smtp in android

6. Is forcing users to enter their order number too much to ask?

7. Trouble in generating the MD5 Fingerprint for SDK Debug Certificate to work on map API's