diff --git a/app/src/main/java/com/xiaweizi/marqueetextview/MainActivity.kt b/app/src/main/java/com/xiaweizi/marqueetextview/MainActivity.kt index cc0fdcd..fe5d6d3 100644 --- a/app/src/main/java/com/xiaweizi/marqueetextview/MainActivity.kt +++ b/app/src/main/java/com/xiaweizi/marqueetextview/MainActivity.kt @@ -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() } } diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 5003d6a..71cfcec 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -6,10 +6,14 @@ android:layout_height="match_parent" tools:context="com.xiaweizi.marqueetextview.MainActivity"> -