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

Hiden items; marquee effect in TextView #30

Open
GoogleCodeExporter opened this issue Oct 26, 2015 · 2 comments
Open

Hiden items; marquee effect in TextView #30

GoogleCodeExporter opened this issue Oct 26, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What version of the product are you using? On what operating system?
I have tried Android 2.3.5, 3.2.1, 4.0.3, compiled with 2.3 SDK or 3.2 SDK.


Please provide any additional information below.

This is one of the amazing projects I ever seen in android!
Thanks the author!

Recently, I am trying to use this wheel widget in my own project.
But I encountered some problems about using this widget.

Issue 1:
The items in one wheel may disappear in the situation 
of the height of wheel is too long.

For example, in the CitiesActivity of wheel-demo project,
I set the height of R.id.country for "210dp", at that time,
the wheel may disappear during moving the wheel over-scroll down.

A video to demonstrate this issue:
http://youtu.be/d4ClwKixdmE

About this issue, I have employed a workaround modification.
I skip the calling of "rebuildItems()" in the function of
updateView() in "WheelView.java" during MotionEvent.ACTION_MOVE.

That can solve this issue in my case, but I don't know whether
it is a good manner or not.



Issue 2:
I want to add marquee effect in the TextView in wheel widget.

For example, the R.id.city in CitiesActivity, I created a custom
adapter view which contains a TextView that have marquee attribute
enabling.
But it can't do what I want.
I tried to call "textView.requestFocus()" or other functions that
set some attributes of "textView" in AbstractWheelTextAdapter.getItem(),
but also in vain.
I also tried to call "textView.requestFocus()" in "WheelView.addViewItem()",
but also in vain, 

I employed the same adapter layout in other normal ListView, it can perform the 
marquee effect.

Following code is my layout:
    <TextView
        android:id="@+id/main_content_text"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="TextView"
        android:gravity="center_vertical|center_horizontal"
        android:layout_centerVertical="true"
        android:textSize="50dip"
        android:ellipsize="marquee"
        android:singleLine="true"
        android:marqueeRepeatLimit="marquee_forever"
        android:focusable="true"
        android:focusableInTouchMode="true" />

Thank for your any suggestions in advance!
Eric


Original issue reported on code.google.com by yksix0...@gmail.com on 3 Feb 2012 at 4:39

@GoogleCodeExporter
Copy link
Author

Did you figure it out? I face the marquee effect in TextView too,it didn't 
function in the wheelView.

Original comment by yoghourt...@gmail.com on 16 May 2014 at 10:12

@GoogleCodeExporter
Copy link
Author

I figure it out. Because the WheelView didn't invalidate itself.In Activity,add 
the code : 
                 Handler handler = new Handler() {
            @Override
            public void handleMessage(Message msg) {
                super.handleMessage(msg);
                wheelview.invalidate();
                sendEmptyMessageDelayed(0, 0);
            }
        };  
        handler.sendEmptyMessage(0);
Then the TextView Marquee effect works.

I had try the TextView Marquee effect in ListView, the Marquee effect works.I 
gonna check the ListView  source code ,see what differences between ListView 
and WheelView.

Original comment by yoghourt...@gmail.com on 19 May 2014 at 10:06

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

No branches or pull requests

1 participant