Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:1.1.3'
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.github.townsfolk:gradle-release:1.2'
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=1.1.5
version=1.1.6
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 @@
#Sat Apr 11 12:33:15 CST 2015
#Mon Dec 26 08:37:51 CET 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
7 changes: 4 additions & 3 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ archivesBaseName = 'marqueeview'
group = 'asia.ivity.android'

dependencies {
/* compile 'com.google.android.gms:play-services:3.1.36+'*/
/* compile 'com.google.android.gms:play-services:3.1.36+'*/
compile 'com.android.support:appcompat-v7:25.1.0'
}

android {
compileSdkVersion 19
buildToolsVersion "21.1.2"
compileSdkVersion 25
buildToolsVersion '25.0.2'
}

// TODO: Add a task that prints the test results.
Expand Down
4 changes: 2 additions & 2 deletions library/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
android:versionName="1.0">

<uses-sdk
android:minSdkVersion="7"
android:targetSdkVersion="21"/>
android:minSdkVersion="9"
android:targetSdkVersion="25"/>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import android.content.res.TypedArray;
import android.graphics.Paint;
import android.os.Build;
import android.support.v7.widget.AppCompatTextView;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.AttributeSet;
Expand Down Expand Up @@ -32,7 +33,7 @@ public class MarqueeView extends LinearLayout {
private static final int TEXTVIEW_VIRTUAL_WIDTH = 2000;

private Animation mMoveTextOut = null;
private Animation mMoveTextIn = null;
private Animation mMoveTextIn = null;

private Paint mPaint;

Expand Down Expand Up @@ -152,8 +153,25 @@ protected void onLayout(boolean changed, int l, int t, int r, int b) {
}

if (changed && mScrollView == null) {
if (!(getChildAt(0) instanceof TextView)) {
throw new RuntimeException("The child view of this MarqueeView must be a TextView instance.");
boolean exception = true;

if (exception) {
if (getChildAt(0) instanceof TextView) {
exception = false;
}
}

/**
* when building your app autoconvert TextView to AppCompatTextView
*/
if (exception) {
if (getChildAt(0) instanceof AppCompatTextView) {
exception = false;
}
}

if (exception) {
throw new RuntimeException("The child view of this MarqueeView must be a TextView || AppCompatTextView instance.");
}

initView(getContext());
Expand Down
4 changes: 2 additions & 2 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ dependencies {
}

android {
compileSdkVersion 19
buildToolsVersion "21.1.2"
compileSdkVersion 25
buildToolsVersion '25.0.2'
}
4 changes: 2 additions & 2 deletions sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
android:versionName="1.1">

<uses-sdk
android:minSdkVersion="7"
android:targetSdkVersion="21"/>
android:minSdkVersion="9"
android:targetSdkVersion="25"/>
<application
android:label="@string/app_name"
android:icon="@drawable/ic_launcher"
Expand Down