Skip to content

Commit

Permalink
调整ui,缩小图片
Browse files Browse the repository at this point in the history
  • Loading branch information
hss01248 committed Apr 26, 2020
1 parent 453dbe7 commit 32ce4b4
Show file tree
Hide file tree
Showing 23 changed files with 64 additions and 52 deletions.
Binary file modified .idea/caches/gradle_models.ser
Binary file not shown.
3 changes: 3 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ android {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:28.0.0'
compile 'androidx.appcompat:appcompat:1.1.0'
compile project(path: ':pagestate')
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.jakewharton:butterknife:8.7.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.7.0'
//compile 'com.jakewharton:butterknife:10.2.1'
//annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.1'
//compile 'com.wuhenzhizao:titlebar:1.2.0'
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.hss01248.pagestate.demo;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.support.annotation.Nullable;
import androidx.annotation.Nullable;
import android.view.View;

import com.hss01248.pagestate.PageStateConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import android.os.Bundle;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatActivity;
import android.view.View;

import com.hss01248.pagestate.PageStateConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import android.graphics.Paint;
import android.graphics.Path;
import android.os.Build;
import android.support.v4.content.ContextCompat;
import androidx.core.content.ContextCompat;
import android.util.AttributeSet;
import android.view.View;
import android.view.animation.DecelerateInterpolator;
Expand Down
23 changes: 9 additions & 14 deletions app/src/main/java/com/hss01248/pagestate/demo/SplashActy.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,31 @@
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import androidx.annotation.Nullable;
import android.view.View;
import android.widget.Button;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;


/**
* Created by huangshuisheng on 2017/10/16.
*/

public class SplashActy extends Activity {
public class SplashActy extends Activity implements View.OnClickListener {


@BindView(R.id.button)
Button button;
@BindView(R.id.button2)
Button button2;
@BindView(R.id.button3)
Button button3;

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.acty_splash);
ButterKnife.bind(this);
findViewById(R.id.button).setOnClickListener(this);
findViewById(R.id.button2).setOnClickListener(this);
findViewById(R.id.button3).setOnClickListener(this);
}

@OnClick({R.id.button, R.id.button2,R.id.button3})
public void onViewClicked(View view) {
@Override
public void onClick(View view) {
switch (view.getId()) {
case R.id.button:
startActivity(new Intent(this,MainActivity.class));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import android.os.Bundle;
import android.os.Handler;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import android.view.View;

import com.hss01248.pagestate.PageStateConfig;
Expand Down
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@
# 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
# org.gradle.parallel=true
android.enableJetifier=true
android.useAndroidX=true
2 changes: 1 addition & 1 deletion pagestate/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ android {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:28.0.0'
api 'androidx.appcompat:appcompat:1.1.0'
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package com.hss01248.pagestate;

import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.support.v7.app.AlertDialog;
import androidx.appcompat.app.AlertDialog;

/**
* time:2020/4/25
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import android.app.Activity;
import android.content.Context;
import android.support.v4.app.Fragment;
import androidx.fragment.app.Fragment;
import android.view.View;
import android.view.ViewGroup;

Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pagestate/src/main/res/drawable-xxhdpi/ic_error_page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 14 additions & 9 deletions pagestate/src/main/res/layout/pager_empty.xml
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:background="#ffffff"
android:orientation="vertical"
android:gravity="center_horizontal"
android:layout_height="match_parent" >

<ImageView
android:id="@+id/empty_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="204dp"
android:layout_height="228dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="40dp"
android:src="@drawable/ic_empty_page" />
android:layout_marginTop="60dp"
android:src="@drawable/ic_empty_page_2" />
<TextView
android:id="@+id/tv_msg_empty"
android:layout_below="@id/empty_icon"
android:layout_marginTop="15dp"
android:layout_marginTop="20dp"
android:textSize="15sp"
android:layout_centerHorizontal="true"
android:text="咦...没有任何内容,先去逛逛别的吧"
android:text="@string/pagestate_empty_msg"
android:textColor="#666666"
android:layout_width="wrap_content"
android:gravity="center"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:layout_width="match_parent"
android:layout_height="wrap_content" />


</RelativeLayout>
</LinearLayout>
16 changes: 9 additions & 7 deletions pagestate/src/main/res/layout/pager_error.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<!--<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:background="#ffffff"
android:layout_height="match_parent" >
android:layout_height="match_parent" >-->

<LinearLayout

xmlns:android="http://schemas.android.com/apk/res/android"
android:background="#ffffff"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
Expand All @@ -20,9 +21,9 @@

<TextView
android:id="@+id/tv_msg_error"
android:text="来到一个没有网络的异次元"
android:text="@string/pagestate_error_occurs"
android:textColor="#333333"
android:textSize="13sp"
android:textSize="14sp"
android:gravity="center"
android:layout_marginBottom="20dp"
android:layout_marginLeft="20dp"
Expand All @@ -39,9 +40,10 @@
android:background="@drawable/selector_btn_bg"
android:paddingLeft="25dp"
android:paddingRight="25dp"
android:text="加载失败,点击重试"
android:text="@string/pagestate_click_to_retry"
android:textColor="#ff717171"
android:textSize="14sp" />
</LinearLayout>

</RelativeLayout>
<!--
</RelativeLayout>-->
5 changes: 3 additions & 2 deletions pagestate/src/main/res/layout/pager_loading.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@
/>

<TextView
android:text="加载中..."
android:text="@string/page_loading"
android:layout_marginTop="20dp"
android:layout_centerHorizontal="true"
android:layout_below="@id/progressbar"
android:textSize="16sp"
android:gravity="center"
android:textColor="#333333"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content" />


Expand Down
4 changes: 4 additions & 0 deletions pagestate/src/main/res/values-zh/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@
</string>
<string name="pagestate_go_setting">去设置页</string>
<string name="pagestate_cancel">取消</string>
<string name="page_loading">加载中…</string>
<string name="pagestate_click_to_retry">点击重试</string>
<string name="pagestate_error_occurs">发生了一些错误,请稍后重试</string>
<string name="pagestate_empty_msg">咦…没有任何内容,先去逛逛别的吧</string>
</resources>
4 changes: 4 additions & 0 deletions pagestate/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@
</string>
<string name="pagestate_go_setting">Go Settings</string>
<string name="pagestate_cancel">Cancel</string>
<string name="page_loading">loading…</string>
<string name="pagestate_click_to_retry">click to retry</string>
<string name="pagestate_error_occurs">some error occurs</string>
<string name="pagestate_empty_msg">opps, it seems that response is empty, go to see something else</string>
</resources>

0 comments on commit 32ce4b4

Please sign in to comment.