Resources:http://blog.csdn.net/huiwolf2008/article/details/7901084Http://www.cnblogs.com/Gaojiecai/archive/2013/06/18/3142783.htmlIn TextView and EditText, you can use Ellipsize to set up text overflow hiding, such as: "A long text ..."Use the following:in XMLAndroid:ellipsize = "End" ellipsis at the endAndroid:ellipsize = "Start" ellipsis at the beginningAndroid:ellipsize = "Middle" ellipsis in the middleAndroid:ellipsize = "Marquee" marqueeIt is bes
Sometimes the marquee effect written in XML does not scroll: The reasons are as followsIn the Android system TextView realizes the marquee effect, must have the following several conditions: 1, android:ellipsize= "marquee" 2, TextView must be shown in a single line, that is, the content must exceed the TextView size 3, TextView to get focus to scroll (if not, use
Marquee>Label, it is a label that appears in pairs, the first labelMarquee>and tail labelMarquee>The content between is scrolling content.Marquee>The properties of the tag are behavior, bgcolor, direction, width, height, hspace, vspace, Loop, scrollamount, scrolldelay, etc., which are optional. The parameter value of the Behavior property Behavior property is one of alternate, scroll, and slide, indicating that the text scrolls back and forth, scrolls
The screen of a mobile phone is relatively small. Sometimes you need to use a text box (TextView or its subclass) to display a long line of text. One way is to cut the text, use... .
A common practice is to use Marquee to scroll text. This example describes the Marquee Effect of TextView.
Let's take a look at the definition of marquee. xml in layout:
[Html]Androi
TextView Simple EffectTextView Android:text="@string/longword"Android:layout_width="wrap_content"Android:layout_height="wrap_content"Android:id="@+id/textview1"android:ellipsize="Marquee"Android:singleline="true"android:focusable="true"Android:focusableintouchmode="true"/>TextView a few of the common properties of the marquee effect, of which ellipsize, Singleline, focusable, Focusableintouchmode are requir
Implement a seamless rolling plug-in for marquee Based on jQuery, jquerymarquee
JQuery-based plug-ins that implement seamless marquee scrolling have been released to git.oschina.net to demonstrate later updates (updated to the http://git.oschina.net/mqycn/jQueryMarquee ).
The Code is as follows:
/*** Class library name: jQuery. marquee * Implementation function:
Android:textview automatic scrolling (marquee)TextView implementation of text scrolling requires the following points: 1. Text length is longer than can be displayed range: Android:singleline= "true" 2. Set scroll to, or display style: android:ellipsize= "marquee" 3. TextView The hidden text is only scrolled when the focus is taken, so you need to create a new class in the package to inherit the TextView. O
Marquee
Imitate IE below the marquee effect, the mouse moves up pauses. The main principle of forming a ring is that each picture once determines the outer display window to be added to the tail, using append and prepend to simulate the push () and shift () of the array.
The code is as follows:
Html
Css
@charset "Utf-8";
/* CSS Document */
body{
margin:0 0;
padding:0 0;
height:100%
Use the usual to pull the map is very common, but also very useful, learn to pull the map from the simplest we have to start from simple to complex, will be better grasp the pull map, then I will give you a brief introduction of the simple PS pull map, with rectangular marquee tool as an example
Tools/raw Materials
Photoshop
Method/Step
Open the Photoshop software and open the file you want to edit
Right-click the
In the classic forum to see the Netizen Jeanjean20 mentioned marquee how to modify to meet the standard. I looked at the friends of the thread feel very good, moderator GREENGNN indicated that marquee is not in line with the standard has been discarded. Have a friend big dozen uneven say feel go to unreasonable, originally very good effect now changed. Also have a friend said go to good, look at bored. Ever
In the Android Apidemo, there is a button merry-go effect, but the change is TextView, or a little difference.
Define MERRY-GO (Marquee), mainly in Project/res/layout/main.xml
Copy Code code as follows:
Android:layout_width= "40px"
android:layout_height= "Wrap_content"
android:text= "Test marquee for TextView"
android:layout_gravity= "Center"
Android:ellipsize= "
Marquee was abandoned by W3C. This sentence is actually incorrect. Why? Because Marquee has never been regarded as a formal tag by W3C. In the forum, I saw the netizen jeanjean20 mentioned how to modify Marquee to meet the standards. I read my friends' posts and thought it was quite good. The moderator greengnn indicated that
The marquee tag is used to scroll the text in the available browsing area. This tag only applies to IE3 later versions of the browser.
Format:
Behavior= "..."
Bgcolor= "..."
Direction= "..."
Height= "..."
Width= "..."
Hspace= "..."
Vspace= "..."
Loop= "..."
Scrollamount= "..."
Scrolldelay= "..."
"..."
Property:
ALIGN: Used to align scrolling text by a set value. The values that align can set are: Left,center,right,top,bottom. This property is not nec
TextView provides the following key points for text scrolling:1. The text length is longer than the display range: android: singleLine = "true"2. Set to be rolled to or display style: android: ellipsize = "marquee"3. TextView only scrolls to display hidden text after obtaining the focus. Therefore, you need to create a new class in the package to inherit TextView. Override the isFocused method. The default behavior of this method is: If TextView gets
To make text in TextView scroll, you must meet the following factors:
1,textview text width over textview width2,android:ellipsize= "Marquee"3, scrolling only occurs when TextView gets the focus. So add Android:focusableintouchmode= "true" android:focusable= "true"The easiest thing to ignore is the third one.
Scrolling repeat number setting:
android:marqueerepeatlimit= "Marquee_forever"
Look at a TextView property android:ellipsize to realize the
TextView realize the effect of the marquee:Example one:This example can be solved to a textview realize the effect of the marquee, but can not solve all the textview to achieve the effect of the marquee. textview android:layout_width = "Wrap_content" = "Wrap_content" = "true" Android: Ellipsize = "marquee" android:focusable = "true" android:focusab
With a variety of software upgrades, our system IE6 is also gradually eliminated, the current mainstream browser half of the users have been directly upgraded from IE6 to IE8, although to the user better experience, the Internet faster and more convenient, but for the site production, is a more troublesome problem, Because a lot of page code in different browsers display the effect is not the same, compatibility control is difficult to grasp.Today, a friend asked me why he was under the IE6, do
The main reason is that the Marquee in IE is not universal and cannot work normally in other browsers. Therefore, JavaScript is used to rewrite its functions to support multiple browsers! The function has been encapsulated in Marquee. js and supports uninterrupted scrolling (default). If the content length and width in the subtitle area are smaller than the length and width set in the subtitle area, it is n
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.