Skip to content

Commit

Permalink
使用自定义 MarqueeTextView
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaweizi committed Dec 26, 2017
1 parent f0a8cfd commit e66df67
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package com.xiaweizi.marqueetextview

import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import kotlinx.android.synthetic.main.activity_main.*

class MainActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
marquee.startScroll()
}
}
6 changes: 5 additions & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
android:layout_height="match_parent"
tools:context="com.xiaweizi.marqueetextview.MainActivity">

<TextView
<com.xiaweizi.marquee.MarqueeTextView
android:id="@+id/marquee"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
app:scroll_mode="mode_forever"
app:scroll_interval="10000"
app:scroll_first_delay="0"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
Expand Down

0 comments on commit e66df67

Please sign in to comment.