scroll from one end to the other and does not repeat. The code is as follows: BgColorSets the background color of the active caption, and the background color can be set by the format or color name of the RGB, 16 binary values. The code is as follows: DirectionSet the scrolling direction code for the active caption as follows: HeightSet the height code for the active caption as follows:WidthSet the width code for the active caption as follows:Sets th
is also a popular marquee control canvas)
Set some property canvas_board for the canvas. VerticalAlignment = Verticalalignment.stretch; Canvas_board. HorizontalAlignment = Horizontalalignment.stretch;canvas_board. Width = This.viewbox_main. Actualwidth;canvas_board. Height = This.viewbox_main. Actualheight;canvas_board. ClipToBounds = true;//with Viewbox can support stretching this.viewbox_main. Child = Canvas_board;
4, will loop the grid into the ca
Android.view.animation.linearinterpolator;import Android.view.animation.translateanimation;import Android.widget.linearlayout;import Android.widget.scrollview;import android.widget.textview;/** * LinearLayout as the parent view, there must be a child textview * * Using animation to implement */public class Marqueeview extends LinearLayout {private static final int T Extview_virtual_width = 2000;/* textview default width */private static final int default_speed = 35;/* default
First look at the HTML properties of the Marquee
Behavior= "..."
Bgcolor= "..."
Direction= "..."
Height= "..."
Width= "..."
Hspace= "..."
Vspace= "..."
Loop= "..."
Scrollamount= "..."
Scrolldelay= "..."
"..."
Align:--left,center,right,top,bottom on its way (don't say much)
behavior:--is used to set the way to scroll, mainly by three ways:
Behavior= "Scroll"--means to scroll from one end to the other end;
behavior= "Slide":--means to slide from one end
Method One: (can only achieve a single textview of the marquee effect)In TextView add the following controls android:singleline= "True" can only be a single line, the excess text appears as "..." android:ellipsize= "marquee" ellipsis no, but no marquee effect Android: Focusable= "true" android:focusableintouchmode= "true" method two: (can achieve multi-line TextV
Marquee.js
Parameter description:
Demo Caption Area label (DIV) ID;
DEMO1/DEMO2 Displays the ID demo1 of the content label (DIV or TD) as the original content, and Demo2 is its copy;
Direction caption direction (up,down,left,right);
The delay time (milliseconds) of delay subtitles playback;
Step subtitle (i.e. pix, smaller step size, such as step=1, smoother scrolling)
Function Marquee (demo, Demo1, Dem
Marquee. jsParameter description:The ID of the demo subtitle area tag (div;Demo1/demo2: The ID demo1 of the content tag (div or td) is the original content, and demo2 is its copy;Ction subtitle direction (up, down, left, right );Delay the delay time of subtitle playback (MS );Step: The Stride of subtitle playback (I .e., the smaller the stride, for example, step = 1, the smoother the scrolling)Function
Marquee. js
Parameter description:The ID of the demo subtitle area tag (DIV;Demo1/demo2: The ID demo1 of the content tag (Div or TD) is the original content, and demo2 is its copy;Ction subtitle direction (Up, down, left, right );Delay the delay time of subtitle playback (MS );Step: The Stride of subtitle playback (I .e., the smaller the stride, for example, step = 1, the smoother the scrolling)
Funct
There are many ways to implement a marquee, the simplest of which is to use an HTML code to implement, we insert the "
Parameters
Usage Introduction
Behavior=scroll, Slide, alternate
Happy way: Cycle around, only once to stop, back and forth movement
Direction=left,right
Racing direction: Left to right, right to left
loop=100
Happy times: loop 100 times, if not write default t
The automatic scrolling effect of the page, which can be implemented by JavaScript,But there is 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
The so-called marquee effect is the effect of scrolling within the control when the text exceeds the space that the control can hold.The prerequisite for displaying the marquee effect is that your text content is longer than the external component that displays the text, that is, the external component is not able to fully display the internal text content.TextVi
Android's own horse-lamp effect is not very good control, can not control speed, can not stop and start immediately, but also by the focus of the impact of the egg ache unceasingly. Because the project needs to use the high control of the effect of the horse, so I wrote a custom TextView
Attention: When the layout file refers to this view, the Paddingleft,paddingrigh must be 0DP, you need to add these two properties, you can modify the code.
Android:ellipsize= "
First, give theThe middle of the color block is because the video turns into GIF caused by the distortion, automatically ignore the ha.As you know, the landscape of the race lights Android comes with the TextView can be achieved, details please Baidu "Android marquee effect." But vertical marquee effect native Android is not supported. Online also have a lot of users to achieve a custom effect, but I always
[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
As the number of Marquee labels is getting fewer and fewer, most of the scrolling effects are implemented using JavaScript.
Marquee is abandoned because marquee is a theme that seriously affects user experience. compressing dozens of lines of content to several rows of scrolling
create a horizontal scroll subtitle, set its scrollTop attribute to 0, which overwrites any script settings.ScrollHeight -- get the scroll height of an objectScrollAmount -- sets or obtains the number of text scrolling sequences between each subtitle draw sequence.OffsetTop -- obtains the top position of an object relative to the layout or the parent coordinate specified by the offsetTop attribute.OffsetLeft -- obtains the left position of an object
Detailed description of Marquee usage
Release: | Author: cnnas | Source: Large windmill Chinese and English portal community
A few days ago, I had to perform uninterrupted scrolling. After searching for a long time, I finally found the method written by Amy's tears. After raidl was perfect, it was very easy to use and did not dare to hide it. I 'd like to share it with you. At that time, it was saved separ
I'm getting a project recently. A picture showing the effect of a marquee is required.Online Search a bunch, have no perfect realization of forget or write it yourself!The implementation principle utilizes the Viewpager control, which natively supports sliding page flipping, which is very good, very powerful, and it can be used for many functions. Use of Mviewpager.setcurrentitem (Currentindex); To toggle the currently displayed viewIn addition a time
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.