The effect of a running horse lamp is the effect of scrolling in the control when the text exceeds the space that the control can hold.
To achieve this effect, you must add the following in the layout file:
android:singleLine=”true”android:ellipsize=”marquee”android:focusableInTouchMode=”true”android:focusable=”true”
Note: layout_width = "" must be written as a fixed value. It cannot be wrap_content or fill_parent, and it must be longer than the tex
JQuery simulates Marquee for a complete example of seamless scrolling effect, jquerymarquee
This article describes how jQuery simulates Marquee to achieve seamless scrolling. We will share this with you for your reference. The details are as follows:
Android:id= "@+id/btn1"Android:layout_width= "Match_parent"android:layout_height= "Wrap_content"Android:ellipsize= "Marquee"Android:focusable= "true"Android:focusableintouchmode= "true"Android:singleline= "true"Android:text= "A scholar Isaac loudly took place in the Aston sent to send to send to send to send to send to the occurrence occurrence of the sending to the occurrence of the occurrence of a Satan mage sent Stephen Aston took place Isaac sent
Recently in writing their own first app, the process encountered this problem, check a lot of posts, after trying to find that this problem is generally divided into two categories:1. TextView text value is not changed after assignment, many of the posts said the following wording can be effective: TextViewAndroid:id= "@+id/music_name_tv"Android:layout_width= "Match_parent"Android:layout_height= "Wrap_content"android:ellipsize= "marquee" "m
The first step is to add bold portions of the code to the layout:TextViewAndroid:id= "@+id/tv_company"Android:layout_width= "0DP"Android:layout_height= "Wrap_content"Android:layout_weight= "1" android:ellipsize= "marquee" android:marqueerepeatlimit= " Marquee_forever " android:singleline=" true " Android:textcolor= "@color/black_alpha80"Android:text= "Blue sky white clouds floating, under the white clouds horse run, waving whip son rang quartet, hun
Below is I find on the internet a relatively simple marquee and JS to solve the picture of seamless scrolling method, including up, down, left and right four directions scrolling, below to introduce you;
Let's take a look at several properties of the objects used in the instance code:
1, InnerHTML: Set or get the HTML in the start and end tags of the object
2, ScrollHeight: Get the scroll height of the object.
3. ScrollLeft: Sets or gets the left
Div+css+javascript to achieve seamless scrolling, marquee seamless scrolling, seamless scrolling, compatible with Firefox
Using marquee to achieve the end-end connected cycle scrolling effect (ie only):
Copy Code code as follows:
Here is the content to scroll
Using Div+css+javascript to achieve the end to end connected cycle scrolling effect (compatible with Firefox):
Copy Co
Moving text (Marquee)
The Marquee tag is used to scroll text in the available browsing area. This tag is only applicable to browsers later than ie3.
Format:
BEHAVIOR = "... "
BGCOLOR = "... "
DIRECTION = "... "
HEIGHT = "... "
WIDTH = "... "
HSPACE = "... "
VSPACE = "... "
LOOP = "... "
SCROLLAMOUNT = "... "
SCROLLDELAY = "... "
ONMOUSEOUT = this. start ()
ONMOUSEOVER = this. stop ()
>
Page Auto-scrolling effect, can be implemented by JavaScript, but today inadvertently found an HTML tag-Use marquee tags not only to move text, but also to move pictures, tables, and so on.Syntax:Important attributes:1. Scrolling direction direction (including 4 values: Up, down, left, and right)Syntax: 2. Scrolling mode behavior (scroll: cyclic scrolling, default effect; slide: stop only once scrolling; alternate: rotate back and forth)Syntax: 3. Scr
[HTML
Code ] Text to be moved (marquee)
The marquee tag is used to scroll text in the available browsing area. This tag is only applicable to browsers later than ie3.Format:Behavior = "... "Bgcolor = "... "Direction = "... "Height = "... "Width = "... "Hspace = "... "Vspace = "... "Loop = "... "Scrollamount = "... "Scrolldelay = "... "Onmouseout = This. Start ()Onmouseover = this. Stop ()>...Attribute:A
marquee| various text scrolling codes (for Announcements) 1. Create the first scrolling caption. Code:Effects such as: I clock the Web tree2. Detailed Parameters:A)scrollamount. It represents speed, and the greater the value, the faster. If it is not, the default is 6, which is better.b) Width and height, which indicates the size of the scrolling area, width is wide, height is high. Especially when doing vertical scrolling, be sure to set the height v
Direction: Sets the direction of scrolling;Height: Set label height, Width: set label width;Behavior= "Aletrnate": Once all appear, hit the edge back and forth;behavior= "Slide": all at once, hit the edge stop;Behavior= "Scroll": Default infinite Loop loop= "3": Loop 3 times, set the number of cycles;Set the two properties of the speed: scrollamount= "30" moves 30 pixels at a time, scrolldelay= "500" for 0.5 seconds;Hspace: Horizontal direction empty How much, set is left and right are empty;Vap
1 XML file
XML file:Android:id= "@+id/tv1"Android:layout_width= "Wrap_content"android:layout_height= "Wrap_content"Android:ellipsize= "Marquee"Android:singline= "true"//single-line displayAndroid:focusable= "true"Android:focusableintouchmode= "true"android:text= "I am a tixeview, I am a tixeview, I am a Tixeview"/>Java files:
Create a MarqueeText class inheritance TextViewpublic class MarqueeText extends textview{Public MarqueeText (contex
First, the introduction of the problemUsing the normal TextView horse racing effect, initially no focus events will not scroll, the button has focus events, but it is ugly, so you need to customize a TextView born with focusThen you need to customize a TextViewFocusedtextview.java PackageCom.xuliugen.mobilesafe.ui;ImportAndroid.content.Context;ImportAndroid.util.AttributeSet;ImportAndroid.view.ViewDebug.ExportedProperty;ImportAndroid.widget.TextView;/** * Happy horse effect, start without focus
Page Auto-scrolling effect, can be implemented by JavaScript, but today inadvertently found an HTML tag-Use marquee tags not only to move text, but also to move pictures, tables, and so on.Syntax:Important attributes:1. Scrolling direction direction (including 4 values: Up, down, left, and right)Syntax: 2. Scrolling mode behavior (scroll: cyclic scrolling, default effect; slide: stop only once scrolling; alternate: rotate back and forth)Syntax: 3. Scr
Page Auto-scrolling effect, can be implemented by JavaScript, but today inadvertently found an HTML tag-Use marquee tags not only to move text, but also to move pictures, tables, and so on.Syntax:Important attributes:1. Scrolling direction direction (including 4 values: Up, down, left, and right)Syntax: 2. Scrolling mode behavior (scroll: cyclic scrolling, default effect; slide: stop only once scrolling; alternate: rotate back and forth)Syntax: 3. Scr
This is the next one, on the animation effect of the collection, this article introduces the marquee animation and falling snowflakes animation, see, say how recently not in the state, good sad (embarrassed ~).Previous-IOS faux yy Live Heart Animation Fireworks AnimationMarquee Effect DemoThe use code is posted here, please download demo view for details.Download ready to use-fast food--star encouragementAfter downloading, in the VC so use, of course
Marquee Parameters:BGColor: Scrolls the background color of the text box.Direction: Scrolling direction setting, selectable left (right to Ieft), Rightup (bottom to top), anddown (top to bottom)Scrolldelay: The lag time between each round of scrolling, the larger the number, the slower the scrolling.ScrollAmount: The total amount of time to scroll, the smaller the number, the slower the scrolling.Behaviour: Scrolling mode setting, three values: Scroll
Mac Chinese Input Method invalidation (do not display marquee) workaroundProblem Description:1, can switch the Chinese and English input method normally;2, switch to the Chinese input method (Sogou or simplified pinyin), only display pinyin and underlined, but does not show the choice of the word mania;Workaround:Method 1:Restart the Mac, sometimes after restarting can solve the problem, sometimes can't solve the problem!Method 2:Click Launchpad, Acti
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.