Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
53 changed files
with
305 additions
and
275 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
app/src/main/java/com/ladingwu/imageloaderframework/JavaBean.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.ladingwu.imageloaderframework; | ||
|
||
/** | ||
* Created by wuzhao on 2018/2/25. | ||
*/ | ||
|
||
public class JavaBean { | ||
public String name="haha"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,51 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:id="@+id/activity_main" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:paddingBottom="@dimen/activity_vertical_margin" | ||
android:paddingLeft="@dimen/activity_horizontal_margin" | ||
android:paddingRight="@dimen/activity_horizontal_margin" | ||
android:paddingTop="@dimen/activity_vertical_margin" | ||
android:orientation="vertical" | ||
tools:context="com.ladingwu.imageloaderframework.MainActivity"> | ||
|
||
|
||
<ImageView | ||
android:id="@+id/img_1" | ||
android:layout_width="200dp" | ||
android:layout_height="200dp" /> | ||
<Button | ||
android:id="@+id/btn1" | ||
android:text="隐藏上图" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" /> | ||
<ImageView | ||
android:id="@+id/img_2" | ||
android:layout_width="200dp" | ||
android:layout_height="200dp" /> | ||
<Button | ||
android:id="@+id/btn2" | ||
android:text="隐藏上图" | ||
<layout xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
<data> | ||
|
||
<variable | ||
name="user" | ||
type="com.ladingwu.imageloaderframework.JavaBean" /> | ||
</data> | ||
|
||
<LinearLayout xmlns:tools="http://schemas.android.com/tools" | ||
android:id="@+id/activity_main" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" /> | ||
</LinearLayout> | ||
android:layout_height="match_parent" | ||
android:orientation="vertical" | ||
android:paddingBottom="@dimen/activity_vertical_margin" | ||
android:paddingLeft="@dimen/activity_horizontal_margin" | ||
android:paddingRight="@dimen/activity_horizontal_margin" | ||
android:paddingTop="@dimen/activity_vertical_margin"> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@{user.name}" | ||
android:textColor="@color/colorAccent" | ||
android:textSize="20dp" /> | ||
|
||
<ImageView | ||
android:id="@+id/img_1" | ||
android:layout_width="200dp" | ||
android:layout_height="200dp" /> | ||
|
||
<Button | ||
android:id="@+id/btn1" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:text="隐藏上图" /> | ||
|
||
<ImageView | ||
android:id="@+id/img_2" | ||
android:layout_width="200dp" | ||
android:layout_height="200dp" /> | ||
|
||
<Button | ||
android:id="@+id/btn2" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:text="隐藏上图" /> | ||
</LinearLayout> | ||
|
||
</layout> |
20 changes: 20 additions & 0 deletions
20
app/src/test/java/com/ladingwu/imageloaderframework/RTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.ladingwu.imageloaderframework; | ||
|
||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
import org.robolectric.Robolectric; | ||
import org.robolectric.RobolectricTestRunner; | ||
|
||
/** | ||
* Created by wuzhao on 2018/2/8. | ||
*/ | ||
|
||
@RunWith(RobolectricTestRunner.class) | ||
public class RTest { | ||
|
||
@Test | ||
public void test() { | ||
MainActivity mainActivity= Robolectric.setupActivity(MainActivity.class); | ||
mainActivity.findViewById(R.id.btn1).performClick(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
apply plugin: 'com.android.library' | ||
apply plugin: 'com.novoda.bintray-release' | ||
android { | ||
compileSdkVersion 26 | ||
|
||
|
||
|
||
defaultConfig { | ||
minSdkVersion 17 | ||
targetSdkVersion 26 | ||
versionCode 1 | ||
versionName "1.0" | ||
|
||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | ||
|
||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
lintOptions { | ||
abortOnError false | ||
} | ||
} | ||
//新添加 | ||
publish { | ||
userOrg = 'ladingwu' //在https://bintray.com上注册的用户名 | ||
repoName='Maven' | ||
groupId = 'com.ladingwu.library' //jCenter上的路径 | ||
artifactId = 'fresco' //要上传的library名称 | ||
publishVersion = "$library_version" //library的版本号 | ||
desc = '' //library的简单描述 | ||
website = 'https://github.com/ladingwu/ImageLoaderFramework' //library的开源地址,例如在github上的地址 | ||
} | ||
|
||
dependencies { | ||
implementation fileTree(include: ['*.jar'], dir: 'libs') | ||
// implementation 'com.android.support:appcompat-v7:26.1.0' | ||
provided "com.android.support:support-annotations:26.1.0" | ||
testImplementation 'junit:junit:4.12' | ||
// androidTestImplementation 'com.android.support.test:runner:1.0.1' | ||
// androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' | ||
compile 'com.facebook.fresco:fresco:1.3.0' | ||
compile 'com.facebook.fresco:webpsupport:1.3.0' | ||
compile 'com.facebook.fresco:animated-base-support:1.3.0' | ||
compile 'com.facebook.fresco:animated-webp:1.3.0' | ||
compile 'com.facebook.fresco:animated-gif:1.3.0' | ||
// compile project(':imageloader-framework') | ||
// compile 'com.ladingwu.library:imageloader-framework:0.0.1' | ||
provided "com.ladingwu.library:imageloader-framework:$library_version" | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
Oops, something went wrong.