Skip to content

Commit

Permalink
沉浸式测试
Browse files Browse the repository at this point in the history
  • Loading branch information
NoEndToLF committed Dec 12, 2017
1 parent d10695d commit ea23df6
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 17 deletions.
3 changes: 2 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ android {
compileSdkVersion 26
defaultConfig {
applicationId "com.wxystatic.gifloadretryrefresh"
minSdkVersion 15
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
Expand All @@ -31,6 +31,7 @@ dependencies {
compile 'io.reactivex.rxjava2:rxjava:2.0.1'
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
compile 'com.github.NoEndToLF:LazyBaseFragment:1.0.4'//lazyFragment
compile 'com.github.NoEndToLF:ToolAndStatusBar:1.0.3'//沉浸式状态栏
compile "com.android.support:design:26.+"
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import android.widget.Toast;

import com.ruffian.library.RTextView;
import com.wstatic.toolandstatusbarlibrary.ToolAndStatusBarMagager;
import com.wxystatic.gifloadretryrefresh.R;
import com.wxystatic.loadretrylibrary.LoadReTryRefreshManager;
import com.wxystatic.loadretrylibrary.LoadRetryRefreshListener;
Expand Down Expand Up @@ -45,6 +46,7 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_success);
ButterKnife.bind(this);
setSupportActionBar(toolbar);
ToolAndStatusBarMagager.getInstance().setStatusBarColor(this,R.color.color_toolbar);
LoadReTryRefreshManager.getInstance().register(this, new LoadRetryRefreshListener() {
@Override
public void loadAndRetry() {
Expand Down
Binary file added app/src/main/res/drawable/back_white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 13 additions & 6 deletions app/src/main/res/layout/activity_success.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
tools:context="com.wxystatic.gifloadretryrefresh.activity.SuccessActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v7.widget.Toolbar
app:contentInsetStart="0dp"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:gravity="center_vertical"
android:id="@+id/toolbar"
android:background="@color/toolbar"
android:background="@color/color_toolbar"
>
<RelativeLayout
android:layout_width="match_parent"
Expand All @@ -29,7 +33,7 @@
android:layout_height="25dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="20dp"
android:src="@drawable/back"
android:src="@drawable/back_white"
/>
</LinearLayout>
<com.ruffian.library.RTextView
Expand All @@ -44,12 +48,14 @@
android:textSize="14sp"
android:paddingLeft="10dp"
android:text="模拟加载成功"
app:border_color_normal="@color/white"
app:border_color_pressed="@color/white"
app:border_width_normal="2dp"
app:border_width_pressed="2dp"
android:paddingRight="10dp"
android:paddingBottom="5dp"
android:paddingTop="5dp"
android:maxLines="1"
app:background_normal="#03a9f4"
app:background_pressed="#0091ea"
android:layout_marginLeft="10dp"
android:layout_marginRight="20dp"
android:id="@+id/loadretry_tv_retry_success"
Expand All @@ -72,4 +78,5 @@
android:id="@+id/tv_content"/>
</ScrollView>
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
</LinearLayout>
</FrameLayout>
1 change: 1 addition & 0 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
<color name="blue_press">#0091ea</color>
<color name="toolbar">#e0e0e0</color>
<color name="gray">#757575</color>
<color name="color_toolbar">#ff9800</color>
</resources>
5 changes: 1 addition & 4 deletions loadretrylibrary/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ apply plugin:'com.github.dcendents.android-maven'
group='com.github.NoEndToLF'
android {
compileSdkVersion 26



defaultConfig {
minSdkVersion 15
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,6 @@ public void register(Activity activity,final LoadRetryRefreshListener loadRetryR

private void initLoadView(Activity activity) {
View loadView=hashMap_activity_loadView.get(activity);
AlphaAnimation alphaAnimation = new AlphaAnimation(0,1);
alphaAnimation.setDuration(500);
loadView.startAnimation(alphaAnimation);
loadView.setVisibility(View.VISIBLE);
LinearLayout loadretry_parent=(LinearLayout)loadView.findViewById(R.id.loadretry_parent);
GifImageView gifImageView=(GifImageView)loadView.findViewById(R.id.loadretry_gifview);
Expand Down Expand Up @@ -274,9 +271,6 @@ public void startLoad(Fragment fragment){
}
private void initLoadView(Fragment fragment) {
View loadView=hashMap_fragment_loadView.get(fragment);
AlphaAnimation alphaAnimation = new AlphaAnimation(0,1);
alphaAnimation.setDuration(500);
loadView.startAnimation(alphaAnimation);
loadView.setVisibility(View.VISIBLE);
LinearLayout loadretry_parent=(LinearLayout)loadView.findViewById(R.id.loadretry_parent);
GifImageView gifImageView=(GifImageView)loadView.findViewById(R.id.loadretry_gifview);
Expand Down

0 comments on commit ea23df6

Please sign in to comment.