diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bfa6a22 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +# Created by .ignore support plugin (hsz.mobi) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index e93087a..9d0f19e 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,6 +1,7 @@ + xmlns:tools="http://schemas.android.com/tools" + package="com.stx.xmarqueeviewdemo"> - + android:theme="@style/AppTheme" + tools:ignore="GoogleAppIndexingWarning"> + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 744ef7b..baf6ef6 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,3 +1,3 @@ - XMarqueeViewDemo + XMarqueeView diff --git a/gradle.properties b/gradle.properties index aac7c9b..5463dad 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,9 +9,7 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. -org.gradle.jvmargs=-Xmx1536m # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 45baaa8..acd392d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Fri Nov 10 10:07:00 CST 2017 +#Fri Aug 17 14:13:22 CST 2018 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip diff --git a/xmarqueeview/build.gradle b/xmarqueeview/build.gradle index 8bbf8ca..4738575 100644 --- a/xmarqueeview/build.gradle +++ b/xmarqueeview/build.gradle @@ -2,19 +2,18 @@ apply plugin: 'com.android.library' apply plugin: 'com.github.dcendents.android-maven' apply plugin: 'com.jfrog.bintray' //提交到仓库中的版本号 -version = "2.0.1" +version = "2.0.2" android { - compileSdkVersion 25 + compileSdkVersion 26 buildToolsVersion '27.0.3' - defaultConfig { minSdkVersion 15 - targetSdkVersion 25 + targetSdkVersion 26 } } dependencies { - compileOnly 'com.android.support:appcompat-v7:25.3.1' + compileOnly 'com.android.support:appcompat-v7:26.1.0' } ///方法1 diff --git a/xmarqueeview/src/main/java/com/stx/xmarqueeview/XMarqueeView.java b/xmarqueeview/src/main/java/com/stx/xmarqueeview/XMarqueeView.java index a2a1cce..4f4deb1 100644 --- a/xmarqueeview/src/main/java/com/stx/xmarqueeview/XMarqueeView.java +++ b/xmarqueeview/src/main/java/com/stx/xmarqueeview/XMarqueeView.java @@ -20,36 +20,25 @@ * Created by jxnk25 on 2017/11/03. */ public class XMarqueeView extends ViewFlipper implements XMarqueeViewAdapter.OnDataChangedListener { - /** - * 是否设置动画时间间隔 - */ + + /**是否设置动画时间间隔*/ private boolean isSetAnimDuration = false; - /** - * 是否单行显示 - */ + /**是否单行显示*/ private boolean isSingleLine = true; - /** - * 轮播间隔 - */ + /**轮播间隔*/ private int interval = 3000; - /** - * 动画时间 - */ + /**动画时间*/ private int animDuration = 1000; private int textSize = 14; private int textColor = Color.parseColor("#888888"); - /** - * 一次性显示多少个 - */ + /**一次性显示多少个*/ private int itemCount = 1; private XMarqueeViewAdapter mMarqueeViewAdapter; - /** - * 当数据源少于一次性显示数目是否自动轮播标记 - */ + /**当数据源少于一次性显示数目是否自动轮播标记*/ private boolean isFlippingLessCount = true; public XMarqueeView(Context context, AttributeSet attrs) { @@ -83,6 +72,7 @@ private void init(Context context, AttributeSet attrs, int defStyleAttr) { setInAnimation(animIn); setOutAnimation(animOut); setFlipInterval(interval); + setMeasureAllChildren(false); }