Skip to content

Commit

Permalink
更新2.0.2版本,解决 #issues/2
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaohaibin committed Nov 19, 2018
1 parent aa2cee1 commit 63d57bd
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 31 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Created by .ignore support plugin (hsz.mobi)
8 changes: 5 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.stx.xmarqueeviewdemo">
xmlns:tools="http://schemas.android.com/tools"
package="com.stx.xmarqueeviewdemo">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name=".MainActivity" android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<resources>
<string name="app_name">XMarqueeViewDemo</string>
<string name="app_name">XMarqueeView</string>
</resources>
2 changes: 0 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
9 changes: 4 additions & 5 deletions xmarqueeview/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 8 additions & 18 deletions xmarqueeview/src/main/java/com/stx/xmarqueeview/XMarqueeView.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -83,6 +72,7 @@ private void init(Context context, AttributeSet attrs, int defStyleAttr) {
setInAnimation(animIn);
setOutAnimation(animOut);
setFlipInterval(interval);
setMeasureAllChildren(false);
}


Expand Down

0 comments on commit 63d57bd

Please sign in to comment.