Просмотр исходного кода

Merge branch 'developer' of https://gitlab.com/Arisono/SkWeiChat-Baidu into feature

Arison 7 лет назад
Родитель
Сommit
1cc6e8ef09
24 измененных файлов с 766 добавлено и 1340 удалено
  1. 0 37
      WeiChat/src/main/res/layout/view_empty.xml
  2. 588 526
      app_core/common/src/main/java/com/core/widget/EmptyLayout.java
  3. 1 1
      app_core/common/src/main/java/com/core/widget/view/Activity/SearchLocationActivity.java
  4. 1 1
      app_core/common/src/main/java/com/core/widget/view/Activity/SelectActivity.java
  5. 0 627
      app_core/common/src/main/java/com/core/widget/view/EmptyLayout.java
  6. BIN
      app_core/common/src/main/res/drawable-hdpi/gif_empty_view.gif
  7. BIN
      app_core/common/src/main/res/drawable-hdpi/ic_empty_image1.png
  8. BIN
      app_core/common/src/main/res/drawable-hdpi/ic_empty_image2.png
  9. BIN
      app_core/common/src/main/res/drawable-hdpi/ic_empty_image3.png
  10. BIN
      app_core/common/src/main/res/drawable-xhdpi/gif_empty_view.gif
  11. BIN
      app_core/common/src/main/res/drawable-xhdpi/ic_empty_image1.png
  12. BIN
      app_core/common/src/main/res/drawable-xhdpi/ic_empty_image2.png
  13. BIN
      app_core/common/src/main/res/drawable-xhdpi/ic_empty_image3.png
  14. BIN
      app_core/common/src/main/res/drawable-xxhdpi/ic_empty_image1.png
  15. BIN
      app_core/common/src/main/res/drawable-xxhdpi/ic_empty_image2.png
  16. BIN
      app_core/common/src/main/res/drawable-xxhdpi/ic_empty_image3.png
  17. 2 2
      app_core/common/src/main/res/layout/activity_booking_set.xml
  18. 28 6
      app_core/common/src/main/res/layout/view_empty.xml
  19. 1 1
      app_core/common/src/main/res/values/colors.xml
  20. 1 1
      app_core/common/src/main/res/values/dimens.xml
  21. 1 1
      app_modular/appbooking/src/main/java/com/modular/booking/activity/business/BBCompanyListActivity.java
  22. 2 2
      app_modular/applogin/src/main/res/layout/activity_modify_password_mode.xml
  23. 140 134
      app_modular/applogin/src/main/res/layout/activity_modify_password_phone.xml
  24. 1 1
      app_modular/appme/src/main/java/com/uas/appme/settings/activity/SettingActivity.java

+ 0 - 37
WeiChat/src/main/res/layout/view_empty.xml

@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/rl_empty"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:orientation="vertical">
-
-    <RelativeLayout
-        android:layout_width="match_parent"
-        android:layout_height="match_parent">
-
-        <TextView
-            android:id="@+id/textViewMessage"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_centerInParent="true"
-            android:layout_marginTop="16dp"
-            android:drawableTop="@drawable/ic_empty"
-            android:text="@string/common_list_empty"
-            android:textAppearance="?android:attr/textAppearanceMedium"
-            android:textColor="@color/gray_light" />
-
-        <Button
-            android:id="@+id/buttonEmpty"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_below="@+id/textViewMessage"
-            android:layout_centerHorizontal="true"
-            android:layout_marginTop="16dp"
-            android:text="@string/empty_button"
-            android:visibility="gone" />
-    </RelativeLayout>
-
-    <TextView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content" />
-</RelativeLayout>

+ 588 - 526
app_core/common/src/main/java/com/core/widget/EmptyLayout.java

@@ -3,6 +3,7 @@ package com.core.widget;
 
 import android.app.Activity;
 import android.content.Context;
+import android.graphics.drawable.Drawable;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
@@ -18,282 +19,314 @@ import android.widget.TextView;
 import com.core.app.MyApplication;
 import com.core.app.R;
 
+import pl.droidsonroids.gif.GifDrawable;
+import pl.droidsonroids.gif.GifImageView;
+
 public class EmptyLayout {
 
-	private Context mContext;
-	private ViewGroup mLoadingView;
-	private ViewGroup mEmptyView;
-	private ViewGroup mErrorView;
-	private Animation mLoadingAnimation;
-	private ListView mListView;
-	private int mErrorMessageViewId;
-	private int mEmptyMessageViewId;
-	private int mLoadingMessageViewId;
-	private LayoutInflater mInflater;
-	private boolean mViewsAdded;
-	private int mLoadingAnimationViewId;	
-	private View.OnClickListener mLoadingButtonClickListener;
+    private Context mContext;
+    private ViewGroup mLoadingView;
+    private ViewGroup mEmptyView;
+    private ViewGroup mErrorView;
+    private Animation mLoadingAnimation;
+    private ListView mListView;
+    private int mErrorMessageViewId;
+    private int mEmptyMessageViewId;
+    private int mLoadingMessageViewId;
+    private LayoutInflater mInflater;
+    private boolean mViewsAdded;
+    private int mLoadingAnimationViewId;
+    private View.OnClickListener mLoadingButtonClickListener;
     private View.OnClickListener mEmptyButtonClickListener;
     private View.OnClickListener mErrorButtonClickListener;
 
-	// ---------------------------
-	// static variables 
-	// ---------------------------
-	/**
-	 * The empty state
-	 */
-	public final static int TYPE_EMPTY = 1;
-	/**
-	 * The loading state
-	 */
-	public final static int TYPE_LOADING = 2;
-	/**
-	 * The error state
-	 */
-	public final static int TYPE_ERROR = 3;	
-
-	// ---------------------------
-	// default values
-	// ---------------------------
-	private int mEmptyType = TYPE_LOADING;
-	private String mErrorMessage = MyApplication.getInstance().getString(R.string.error_system_findunknow_error);
-	private String mEmptyMessage = MyApplication.getInstance().getString(R.string.common_list_empty);
-	private String mLoadingMessage = "";
-	private int mLoadingViewButtonId = R.id.buttonLoading;
-	private int mErrorViewButtonId = R.id.buttonError;
-	private int mEmptyViewButtonId = R.id.buttonEmpty;
-	private boolean mShowEmptyButton = true;
-	private boolean mShowLoadingButton = true;
-	private boolean mShowErrorButton = true;
-
-	// ---------------------------
-	// getters and setters
-	// ---------------------------
-	/**
-	 * Gets the loading layout
-	 * @return the loading layout
-	 */
-	public ViewGroup getLoadingView() {
-		return mLoadingView;
-	}
-	
-	/**
-	 * Sets loading layout
-	 * @param loadingView the layout to be shown when the list is loading
-	 */
-	public void setLoadingView(ViewGroup loadingView) {
-		this.mLoadingView = loadingView;
-	}
-	
-	/**
-	 * Sets loading layout resource
-	 * @param res the resource of the layout to be shown when the list is loading
-	 */
-	public void setLoadingViewRes(int res){
-		this.mLoadingView = (ViewGroup) mInflater.inflate(res, null);
-	}
-	
-	/**
-	 * Gets the empty layout
-	 * @return the empty layout
-	 */
-	public ViewGroup getEmptyView() {
-		return mEmptyView;
-	}
-	
-	/**
-	 * Sets empty layout
-	 * @param emptyView the layout to be shown when no items are available to load in the list
-	 */
-	public void setEmptyView(ViewGroup emptyView) {
-		this.mEmptyView = emptyView;
-	}
-	
-	/**
-	 * Sets empty layout resource
-	 * @param res the resource of the layout to be shown when no items are available to load in the list
-	 */
-	public void setEmptyViewRes(int res){
-		this.mEmptyView = (ViewGroup) mInflater.inflate(res, null);
-	}
-	
-	/**
-	 * Gets the error layout
-	 * @return the error layout
-	 */
-	public ViewGroup getErrorView() {
-		return mErrorView;
-	}
-	
-	/**
-	 * Sets error layout
-	 * @param errorView the layout to be shown when list could not be loaded due to some error
-	 */
-	public void setErrorView(ViewGroup errorView) {
-		this.mErrorView = errorView;
-	}
-	
-	/**
-	 * Sets error layout resource
-	 * @param res the resource of the layout to be shown when list could not be loaded due to some error
-	 */
-	public void setErrorViewRes(int res){
-		this.mErrorView = (ViewGroup) mInflater.inflate(res, null);
-	}
-	
-	/**
-	 * Gets the loading animation
-	 * @return the loading animation
-	 */
-	public Animation getLoadingAnimation() {
-		return mLoadingAnimation;
-	}
-	
-	/**
-	 * Sets the loading animation
-	 * @param animation the animation to play when the list is being loaded
-	 */
-	public void setLoadingAnimation(Animation animation) {
-		this.mLoadingAnimation = animation;
-	}
-	
-	/**
-	 * Sets the resource of loading animation
-	 * @param animationResource the animation resource to play when the list is being loaded
-	 */
-	public void setLoadingAnimationRes(int animationResource) {
-		mLoadingAnimation = AnimationUtils.loadAnimation(mContext, animationResource);
-	}
-	
-	/**
-	 * Gets the list view for which this library is being used
-	 * @return the list view
-	 */
-	public ListView getListView() {
-		return mListView;
-	}
-	
-	/**
-	 * Sets the list view for which this library is being used
-	 * @param listView
-	 */
-	public void setListView(ListView listView) {
-		this.mListView = listView;
-	}
-	
-	/**
-	 * Gets the last set state of the list view
-	 * @return loading or empty or error
-	 */
-	public int getEmptyType() {
-		return mEmptyType;
-	}
-	
-	/**
-	 * Sets the state of the empty view of the list view
-	 * @param emptyType loading or empty or error
-	 */
-	public void setEmptyType(int emptyType) {
-		this.mEmptyType = emptyType;
-		changeEmptyType();
-	}
-	
-	/**
-	 * Gets the message which is shown when the list could not be loaded due to some error
-	 * @return the error message 
-	 */
-	public String getErrorMessage() {
-		return mErrorMessage;
-	}
-	
-	/**
-	 * Sets the message to be shown when the list could not be loaded due to some error
-	 * @param errorMessage the error message
-	 * @param messageViewId the id of the text view within the error layout whose text will be changed into this message
-	 */
-	public void setErrorMessage(String errorMessage, int messageViewId) {
-		this.mErrorMessage = errorMessage;
-		this.mErrorMessageViewId = messageViewId;
-	}
-	
-	/**
-	 * Sets the message to be shown when the list could not be loaded due to some error
-	 * @param errorMessage the error message
-	 */
-	public void setErrorMessage(String errorMessage) {
-		this.mErrorMessage = errorMessage;
-	}
-	
-	/**
-	 * Gets the message which will be shown when the list will be empty for not having any item to display
-	 * @return the message which will be shown when the list will be empty for not having any item to display
-	 */
-	public String getEmptyMessage() {
-		return mEmptyMessage;
-	}
-	
-	/**
-	 * Sets the message to be shown when the list will be empty for not having any item to display
-	 * @param emptyMessage the message
-	 * @param messageId the id of the text view within the empty layout whose text will be changed into this message
-	 */
-	public void setEmptyMessage(String emptyMessage, int messageViewId) {
-		this.mEmptyMessage = emptyMessage;
-		this.mEmptyMessageViewId = messageViewId;
-	}
-	
-	/**
-	 * Sets the message to be shown when the list will be empty for not having any item to display
-	 * @param emptyMessage the message
-	 */
-	public void setEmptyMessage(String emptyMessage) {
-		this.mEmptyMessage = emptyMessage;
-	}
-	
-	/**
-	 * Gets the message which will be shown when the list is being loaded
-	 * @return
-	 */
-	public String getLoadingMessage() {
-		return mLoadingMessage;
-	}
-	
-	/**
-	 * Sets the message to be shown when the list is being loaded
-	 * @param loadingMessage the message
-	 * @param messageViewId the id of the text view within the loading layout whose text will be changed into this message
-	 */
-	public void setLoadingMessage(String loadingMessage, int messageViewId) {
-		this.mLoadingMessage = loadingMessage;
-		this.mLoadingMessageViewId = messageViewId;
-	}
-	
-	/**
-	 * Sets the message to be shown when the list is being loaded
-	 * @param loadingMessage the message
-	 */
-	public void setLoadingMessage(String loadingMessage) {
-		this.mLoadingMessage = loadingMessage;
-	}
-	
-	/**
-	 * Gets the view in the loading layout which will be animated when the list is being loaded
-	 * @return the view in the loading layout which will be animated when the list is being loaded
-	 */
-	public int getLoadingAnimationViewId() {
-		return mLoadingAnimationViewId;
-	}
-	
-	/**
-	 * Sets the view in the loading layout which will be animated when the list is being loaded
-	 * @param loadingAnimationViewId the id of the view
-	 */
-	public void setLoadingAnimationViewId(int loadingAnimationViewId) {
-		this.mLoadingAnimationViewId = loadingAnimationViewId;
-	}	
+    // ---------------------------
+    // static variables
+    // ---------------------------
+    /**
+     * The empty state
+     */
+    public final static int TYPE_EMPTY = 1;
+    /**
+     * The loading state
+     */
+    public final static int TYPE_LOADING = 2;
+    /**
+     * The error state
+     */
+    public final static int TYPE_ERROR = 3;
+
+    // ---------------------------
+    // default values
+    // ---------------------------
+    private int mEmptyType = TYPE_LOADING;
+    private String mErrorMessage = MyApplication.getInstance().getString(R.string.error_system_findunknow_error);
+    private String mEmptyMessage = MyApplication.getInstance().getString(R.string.common_list_empty);
+    private String mLoadingMessage = "";
+    private int mLoadingViewButtonId = R.id.buttonLoading;
+    private int mErrorViewButtonId = R.id.buttonError;
+    private int mEmptyViewButtonId = R.id.buttonEmpty;
+    private boolean mShowEmptyButton = true;
+    private boolean mShowLoadingButton = true;
+    private boolean mShowErrorButton = true;
+
+    // ---------------------------
+    // getters and setters
+    // ---------------------------
+
+    /**
+     * Gets the loading layout
+     *
+     * @return the loading layout
+     */
+    public ViewGroup getLoadingView() {
+        return mLoadingView;
+    }
+
+    /**
+     * Sets loading layout
+     *
+     * @param loadingView the layout to be shown when the list is loading
+     */
+    public void setLoadingView(ViewGroup loadingView) {
+        this.mLoadingView = loadingView;
+    }
+
+    /**
+     * Sets loading layout resource
+     *
+     * @param res the resource of the layout to be shown when the list is loading
+     */
+    public void setLoadingViewRes(int res) {
+        this.mLoadingView = (ViewGroup) mInflater.inflate(res, null);
+    }
+
+    /**
+     * Gets the empty layout
+     *
+     * @return the empty layout
+     */
+    public ViewGroup getEmptyView() {
+        return mEmptyView;
+    }
+
+    /**
+     * Sets empty layout
+     *
+     * @param emptyView the layout to be shown when no items are available to load in the list
+     */
+    public void setEmptyView(ViewGroup emptyView) {
+        this.mEmptyView = emptyView;
+    }
+
+    /**
+     * Sets empty layout resource
+     *
+     * @param res the resource of the layout to be shown when no items are available to load in the list
+     */
+    public void setEmptyViewRes(int res) {
+        this.mEmptyView = (ViewGroup) mInflater.inflate(res, null);
+    }
+
+    /**
+     * Gets the error layout
+     *
+     * @return the error layout
+     */
+    public ViewGroup getErrorView() {
+        return mErrorView;
+    }
+
+    /**
+     * Sets error layout
+     *
+     * @param errorView the layout to be shown when list could not be loaded due to some error
+     */
+    public void setErrorView(ViewGroup errorView) {
+        this.mErrorView = errorView;
+    }
+
+    /**
+     * Sets error layout resource
+     *
+     * @param res the resource of the layout to be shown when list could not be loaded due to some error
+     */
+    public void setErrorViewRes(int res) {
+        this.mErrorView = (ViewGroup) mInflater.inflate(res, null);
+    }
+
+    /**
+     * Gets the loading animation
+     *
+     * @return the loading animation
+     */
+    public Animation getLoadingAnimation() {
+        return mLoadingAnimation;
+    }
+
+    /**
+     * Sets the loading animation
+     *
+     * @param animation the animation to play when the list is being loaded
+     */
+    public void setLoadingAnimation(Animation animation) {
+        this.mLoadingAnimation = animation;
+    }
+
+    /**
+     * Sets the resource of loading animation
+     *
+     * @param animationResource the animation resource to play when the list is being loaded
+     */
+    public void setLoadingAnimationRes(int animationResource) {
+        mLoadingAnimation = AnimationUtils.loadAnimation(mContext, animationResource);
+    }
+
+    /**
+     * Gets the list view for which this library is being used
+     *
+     * @return the list view
+     */
+    public ListView getListView() {
+        return mListView;
+    }
+
+    /**
+     * Sets the list view for which this library is being used
+     *
+     * @param listView
+     */
+    public void setListView(ListView listView) {
+        this.mListView = listView;
+    }
+
+    /**
+     * Gets the last set state of the list view
+     *
+     * @return loading or empty or error
+     */
+    public int getEmptyType() {
+        return mEmptyType;
+    }
+
+    /**
+     * Sets the state of the empty view of the list view
+     *
+     * @param emptyType loading or empty or error
+     */
+    public void setEmptyType(int emptyType) {
+        this.mEmptyType = emptyType;
+        changeEmptyType();
+    }
+
+    /**
+     * Gets the message which is shown when the list could not be loaded due to some error
+     *
+     * @return the error message
+     */
+    public String getErrorMessage() {
+        return mErrorMessage;
+    }
+
+    /**
+     * Sets the message to be shown when the list could not be loaded due to some error
+     *
+     * @param errorMessage  the error message
+     * @param messageViewId the id of the text view within the error layout whose text will be changed into this message
+     */
+    public void setErrorMessage(String errorMessage, int messageViewId) {
+        this.mErrorMessage = errorMessage;
+        this.mErrorMessageViewId = messageViewId;
+    }
+
+    /**
+     * Sets the message to be shown when the list could not be loaded due to some error
+     *
+     * @param errorMessage the error message
+     */
+    public void setErrorMessage(String errorMessage) {
+        this.mErrorMessage = errorMessage;
+    }
+
+    /**
+     * Gets the message which will be shown when the list will be empty for not having any item to display
+     *
+     * @return the message which will be shown when the list will be empty for not having any item to display
+     */
+    public String getEmptyMessage() {
+        return mEmptyMessage;
+    }
+
+    /**
+     * Sets the message to be shown when the list will be empty for not having any item to display
+     *
+     * @param emptyMessage the message
+     * @param messageId    the id of the text view within the empty layout whose text will be changed into this message
+     */
+    public void setEmptyMessage(String emptyMessage, int messageViewId) {
+        this.mEmptyMessage = emptyMessage;
+        this.mEmptyMessageViewId = messageViewId;
+    }
+
+    /**
+     * Sets the message to be shown when the list will be empty for not having any item to display
+     *
+     * @param emptyMessage the message
+     */
+    public void setEmptyMessage(String emptyMessage) {
+        this.mEmptyMessage = emptyMessage;
+    }
+
+    /**
+     * Gets the message which will be shown when the list is being loaded
+     *
+     * @return
+     */
+    public String getLoadingMessage() {
+        return mLoadingMessage;
+    }
+
+    /**
+     * Sets the message to be shown when the list is being loaded
+     *
+     * @param loadingMessage the message
+     * @param messageViewId  the id of the text view within the loading layout whose text will be changed into this message
+     */
+    public void setLoadingMessage(String loadingMessage, int messageViewId) {
+        this.mLoadingMessage = loadingMessage;
+        this.mLoadingMessageViewId = messageViewId;
+    }
+
+    /**
+     * Sets the message to be shown when the list is being loaded
+     *
+     * @param loadingMessage the message
+     */
+    public void setLoadingMessage(String loadingMessage) {
+        this.mLoadingMessage = loadingMessage;
+    }
+
+    /**
+     * Gets the view in the loading layout which will be animated when the list is being loaded
+     *
+     * @return the view in the loading layout which will be animated when the list is being loaded
+     */
+    public int getLoadingAnimationViewId() {
+        return mLoadingAnimationViewId;
+    }
+
+    /**
+     * Sets the view in the loading layout which will be animated when the list is being loaded
+     *
+     * @param loadingAnimationViewId the id of the view
+     */
+    public void setLoadingAnimationViewId(int loadingAnimationViewId) {
+        this.mLoadingAnimationViewId = loadingAnimationViewId;
+    }
 
     /**
      * Gets the OnClickListener which perform when LoadingView was click
+     *
      * @return
      */
     public View.OnClickListener getLoadingButtonClickListener() {
@@ -302,14 +335,16 @@ public class EmptyLayout {
 
     /**
      * Sets the OnClickListener to LoadingView
+     *
      * @param loadingButtonClickListener OnClickListener Object
      */
     public void setLoadingButtonClickListener(View.OnClickListener loadingButtonClickListener) {
         this.mLoadingButtonClickListener = loadingButtonClickListener;
     }
-    
+
     /**
      * Gets the OnClickListener which perform when EmptyView was click
+     *
      * @return
      */
     public View.OnClickListener getEmptyButtonClickListener() {
@@ -318,14 +353,16 @@ public class EmptyLayout {
 
     /**
      * Sets the OnClickListener to EmptyView
+     *
      * @param emptyButtonClickListener OnClickListener Object
      */
     public void setEmptyButtonClickListener(View.OnClickListener emptyButtonClickListener) {
         this.mEmptyButtonClickListener = emptyButtonClickListener;
     }
-    
+
     /**
      * Gets the OnClickListener which perform when ErrorView was click
+     *
      * @return
      */
     public View.OnClickListener getErrorButtonClickListener() {
@@ -334,6 +371,7 @@ public class EmptyLayout {
 
     /**
      * Sets the OnClickListener to ErrorView
+     *
      * @param errorButtonClickListener OnClickListener Object
      */
     public void setErrorButtonClickListener(View.OnClickListener errorButtonClickListener) {
@@ -342,286 +380,310 @@ public class EmptyLayout {
 
     /**
      * Gets if a button is shown in the empty view
+     *
      * @return if a button is shown in the empty view
      */
     public boolean isEmptyButtonShown() {
-		return mShowEmptyButton;
-	}
+        return mShowEmptyButton;
+    }
 
     /**
      * Sets if a button will be shown in the empty view
+     *
      * @param showEmptyButton will a button be shown in the empty view
      */
-	public void setShowEmptyButton(boolean showEmptyButton) {
-		this.mShowEmptyButton = showEmptyButton;
-	}
+    public void setShowEmptyButton(boolean showEmptyButton) {
+        this.mShowEmptyButton = showEmptyButton;
+    }
 
-	/**
+    /**
      * Gets if a button is shown in the loading view
+     *
      * @return if a button is shown in the loading view
      */
-	public boolean isLoadingButtonShown() {
-		return mShowLoadingButton;
-	}
+    public boolean isLoadingButtonShown() {
+        return mShowLoadingButton;
+    }
 
-	/**
+    /**
      * Sets if a button will be shown in the loading view
+     *
      * @param showEmptyButton will a button be shown in the loading view
      */
-	public void setShowLoadingButton(boolean showLoadingButton) {
-		this.mShowLoadingButton = showLoadingButton;
-	}
+    public void setShowLoadingButton(boolean showLoadingButton) {
+        this.mShowLoadingButton = showLoadingButton;
+    }
 
-	/**
+    /**
      * Gets if a button is shown in the error view
+     *
      * @return if a button is shown in the error view
      */
-	public boolean isErrorButtonShown() {
-		return mShowErrorButton;
-	}
+    public boolean isErrorButtonShown() {
+        return mShowErrorButton;
+    }
 
-	/**
+    /**
      * Sets if a button will be shown in the error view
+     *
      * @param showEmptyButton will a button be shown in the error view
      */
-	public void setShowErrorButton(boolean showErrorButton) {
-		this.mShowErrorButton = showErrorButton;
-	}
-    
-	/**
-	 * Gets the ID of the button in the loading view
-	 * @return the ID of the button in the loading view
-	 */
-	public int getmLoadingViewButtonId() {
-		return mLoadingViewButtonId;
-	}	
-	
-	/**
-	 * Sets the ID of the button in the loading view. This ID is required if you want the button the loading view to be click-able.
-	 * @param loadingViewButtonId the ID of the button in the loading view
-	 */
-	public void setLoadingViewButtonId(int loadingViewButtonId) {
-		this.mLoadingViewButtonId = loadingViewButtonId;
-	}
-
-	/**
-	 * Gets the ID of the button in the error view
-	 * @return the ID of the button in the error view
-	 */
-	public int getErrorViewButtonId() {
-		return mErrorViewButtonId;
-	}
-
-	/**
-	 * Sets the ID of the button in the error view. This ID is required if you want the button the error view to be click-able.
-	 * @param errorViewButtonId the ID of the button in the error view
-	 */
-	public void setErrorViewButtonId(int errorViewButtonId) {
-		this.mErrorViewButtonId = errorViewButtonId;
-	}
-
-	/**
-	 * Gets the ID of the button in the empty view
-	 * @return the ID of the button in the empty view
-	 */
-	public int getEmptyViewButtonId() {
-		return mEmptyViewButtonId;
-	}
-	
-	/**
-	 * Sets the ID of the button in the empty view. This ID is required if you want the button the empty view to be click-able.
-	 * @param emptyViewButtonId the ID of the button in the empty view
-	 */
-	public void setEmptyViewButtonId(int emptyViewButtonId) {
-		this.mEmptyViewButtonId = emptyViewButtonId;
-	}
-
-    
-
-
-    
+    public void setShowErrorButton(boolean showErrorButton) {
+        this.mShowErrorButton = showErrorButton;
+    }
+
+    /**
+     * Gets the ID of the button in the loading view
+     *
+     * @return the ID of the button in the loading view
+     */
+    public int getmLoadingViewButtonId() {
+        return mLoadingViewButtonId;
+    }
+
+    /**
+     * Sets the ID of the button in the loading view. This ID is required if you want the button the loading view to be click-able.
+     *
+     * @param loadingViewButtonId the ID of the button in the loading view
+     */
+    public void setLoadingViewButtonId(int loadingViewButtonId) {
+        this.mLoadingViewButtonId = loadingViewButtonId;
+    }
+
+    /**
+     * Gets the ID of the button in the error view
+     *
+     * @return the ID of the button in the error view
+     */
+    public int getErrorViewButtonId() {
+        return mErrorViewButtonId;
+    }
+
+    /**
+     * Sets the ID of the button in the error view. This ID is required if you want the button the error view to be click-able.
+     *
+     * @param errorViewButtonId the ID of the button in the error view
+     */
+    public void setErrorViewButtonId(int errorViewButtonId) {
+        this.mErrorViewButtonId = errorViewButtonId;
+    }
+
+    /**
+     * Gets the ID of the button in the empty view
+     *
+     * @return the ID of the button in the empty view
+     */
+    public int getEmptyViewButtonId() {
+        return mEmptyViewButtonId;
+    }
+
+    /**
+     * Sets the ID of the button in the empty view. This ID is required if you want the button the empty view to be click-able.
+     *
+     * @param emptyViewButtonId the ID of the button in the empty view
+     */
+    public void setEmptyViewButtonId(int emptyViewButtonId) {
+        this.mEmptyViewButtonId = emptyViewButtonId;
+    }
+
+
+    // ---------------------------
+    // private methods
+    // ---------------------------
+
+    private void changeEmptyType() {
+
+        setDefaultValues();
+        refreshMessages();
+
+        // insert views in the root view
+        if (!mViewsAdded) {
+            LayoutParams lp = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
+            lp.addRule(RelativeLayout.CENTER_HORIZONTAL);
+            lp.addRule(RelativeLayout.CENTER_VERTICAL);
+
+            RelativeLayout rl = new RelativeLayout(mContext);
+            rl.setBackgroundColor(mContext.getResources().getColor(R.color.white));
+            rl.setLayoutParams(lp);
+            if (mEmptyView != null) rl.addView(mEmptyView, lp);
+            if (mLoadingView != null) rl.addView(mLoadingView, lp);
+            if (mErrorView != null) rl.addView(mErrorView, lp);
+            mViewsAdded = true;
+
+            ViewGroup parent = (ViewGroup) mListView.getParent();
+            parent.addView(rl);
+            mListView.setEmptyView(rl);
+        }
+
+
+        // change empty type
+        if (mListView != null) {
+            View loadingAnimationView = null;
+            if (mLoadingAnimationViewId > 0)
+                loadingAnimationView = ((Activity) mContext).findViewById(mLoadingAnimationViewId);
+            switch (mEmptyType) {
+                case TYPE_EMPTY:
+                    if (mEmptyView != null) mEmptyView.setVisibility(View.VISIBLE);
+                    if (mErrorView != null) mErrorView.setVisibility(View.GONE);
+                    if (mLoadingView != null) {
+                        mLoadingView.setVisibility(View.GONE);
+                        if (loadingAnimationView != null && loadingAnimationView.getAnimation() != null)
+                            loadingAnimationView.getAnimation().cancel();
+                    }
+                    break;
+                case TYPE_ERROR:
+                    if (mEmptyView != null) mEmptyView.setVisibility(View.GONE);
+                    if (mErrorView != null) mErrorView.setVisibility(View.VISIBLE);
+                    if (mLoadingView != null) {
+                        mLoadingView.setVisibility(View.GONE);
+                        if (loadingAnimationView != null && loadingAnimationView.getAnimation() != null)
+                            loadingAnimationView.getAnimation().cancel();
+                    }
+                    break;
+                case TYPE_LOADING:
+                    if (mEmptyView != null) mEmptyView.setVisibility(View.GONE);
+                    if (mErrorView != null) mErrorView.setVisibility(View.GONE);
+                    if (mLoadingView != null) {
+                        mLoadingView.setVisibility(View.VISIBLE);
+                        if (mLoadingAnimation != null && loadingAnimationView != null) {
+                            loadingAnimationView.startAnimation(mLoadingAnimation);
+                        } else if (loadingAnimationView != null) {
+                            loadingAnimationView.startAnimation(getRotateAnimation());
+                        }
+                    }
+                    break;
+                default:
+                    break;
+            }
+        }
+    }
+
+    private void refreshMessages() {
+        if (mEmptyMessageViewId > 0 && mEmptyMessage != null)
+            ((TextView) mEmptyView.findViewById(mEmptyMessageViewId)).setText(mEmptyMessage);
+        if (mLoadingMessageViewId > 0 && mLoadingMessage != null)
+            ((TextView) mLoadingView.findViewById(mLoadingMessageViewId)).setText(mLoadingMessage);
+        if (mErrorMessageViewId > 0 && mErrorMessage != null)
+            ((TextView) mErrorView.findViewById(mErrorMessageViewId)).setText(mErrorMessage);
+    }
+
+    private void setDefaultValues() {
+        if (mEmptyView == null) {
+            mEmptyView = (ViewGroup) mInflater.inflate(R.layout.view_empty, null);
+            if (!(mEmptyMessageViewId > 0)) mEmptyMessageViewId = R.id.textViewMessage;
+            if (mShowEmptyButton && mEmptyViewButtonId > 0 && mEmptyButtonClickListener != null) {
+                View emptyViewButton = mEmptyView.findViewById(mEmptyViewButtonId);
+                if (emptyViewButton != null) {
+                    emptyViewButton.setOnClickListener(mEmptyButtonClickListener);
+                    emptyViewButton.setVisibility(View.VISIBLE);
+                }
+            } else if (mEmptyViewButtonId > 0) {
+                View emptyViewButton = mEmptyView.findViewById(mEmptyViewButtonId);
+                emptyViewButton.setVisibility(View.GONE);
+            }
+
+            try {
+                GifImageView gifImageView = mEmptyView.findViewById(R.id.view_empty_gif);
+                if (gifImageView != null) {
+                    GifDrawable drawable = (GifDrawable) gifImageView.getDrawable();
+                    if (drawable != null) {
+                        drawable.setSpeed(0.6f);
+                    }
+                }
+            } catch (Exception e) {
+
+            }
+        }
+        if (mLoadingView == null) {
+            mLoadingView = (ViewGroup) mInflater.inflate(R.layout.view_loading, null);
+            mLoadingAnimationViewId = R.id.imageViewLoading;
+            if (!(mLoadingMessageViewId > 0)) mLoadingMessageViewId = R.id.textViewMessage;
+            if (mShowLoadingButton && mLoadingViewButtonId > 0 && mLoadingButtonClickListener != null) {
+                View loadingViewButton = mLoadingView.findViewById(mLoadingViewButtonId);
+                if (loadingViewButton != null) {
+                    loadingViewButton.setOnClickListener(mLoadingButtonClickListener);
+                    loadingViewButton.setVisibility(View.VISIBLE);
+                }
+            } else if (mLoadingViewButtonId > 0) {
+                View loadingViewButton = mLoadingView.findViewById(mLoadingViewButtonId);
+                loadingViewButton.setVisibility(View.GONE);
+            }
+        }
+        if (mErrorView == null) {
+            mErrorView = (ViewGroup) mInflater.inflate(R.layout.view_error, null);
+            if (!(mErrorMessageViewId > 0)) mErrorMessageViewId = R.id.textViewMessage;
+            if (mShowErrorButton && mErrorViewButtonId > 0 && mErrorButtonClickListener != null) {
+                View errorViewButton = mErrorView.findViewById(mErrorViewButtonId);
+                if (errorViewButton != null) {
+                    errorViewButton.setOnClickListener(mErrorButtonClickListener);
+                    errorViewButton.setVisibility(View.VISIBLE);
+                }
+            } else if (mErrorViewButtonId > 0) {
+                View errorViewButton = mErrorView.findViewById(mErrorViewButtonId);
+                errorViewButton.setVisibility(View.GONE);
+            }
+        }
+    }
+
+    private static Animation getRotateAnimation() {
+        final RotateAnimation rotateAnimation = new RotateAnimation(0, 360, Animation.RELATIVE_TO_SELF, .5f, Animation.RELATIVE_TO_SELF, .5f);
+        rotateAnimation.setDuration(1500);
+        rotateAnimation.setInterpolator(new LinearInterpolator());
+        rotateAnimation.setRepeatCount(Animation.INFINITE);
+        return rotateAnimation;
+    }
+
 
     // ---------------------------
-	// private methods
-	// ---------------------------	
-
-	private void changeEmptyType() {
-		
-		setDefaultValues();
-		refreshMessages();
-
-		// insert views in the root view
-		if (!mViewsAdded) {
-			LayoutParams lp = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
-			lp.addRule(RelativeLayout.CENTER_HORIZONTAL);
-			lp.addRule(RelativeLayout.CENTER_VERTICAL);
-			
-			RelativeLayout rl = new RelativeLayout(mContext);
-//			rl.setBackgroundColor(mContext.getResources().getColor(R.color.lightpink));
-			rl.setLayoutParams(lp);
-			if (mEmptyView!=null) rl.addView(mEmptyView);
-			if (mLoadingView!=null) rl.addView(mLoadingView);
-			if (mErrorView!=null) rl.addView(mErrorView);
-			mViewsAdded = true;			
-
-			ViewGroup parent = (ViewGroup) mListView.getParent();
-			parent.addView(rl);
-			mListView.setEmptyView(rl);
-		}
-		
-		
-		// change empty type
-		if (mListView!=null) {
-			View loadingAnimationView = null;
-			if (mLoadingAnimationViewId > 0) loadingAnimationView = ((Activity) mContext).findViewById(mLoadingAnimationViewId); 
-			switch (mEmptyType) {
-			case TYPE_EMPTY:
-				if (mEmptyView!=null) mEmptyView.setVisibility(View.VISIBLE);
-				if (mErrorView!=null) mErrorView.setVisibility(View.GONE);
-				if (mLoadingView!=null) {
-					mLoadingView.setVisibility(View.GONE); 
-					if (loadingAnimationView!=null && loadingAnimationView.getAnimation()!=null) loadingAnimationView.getAnimation().cancel();
-				}
-				break;
-			case TYPE_ERROR:
-				if (mEmptyView!=null) mEmptyView.setVisibility(View.GONE);
-				if (mErrorView!=null) mErrorView.setVisibility(View.VISIBLE);
-				if (mLoadingView!=null) {
-					mLoadingView.setVisibility(View.GONE); 
-					if (loadingAnimationView!=null && loadingAnimationView.getAnimation()!=null) loadingAnimationView.getAnimation().cancel();
-				}
-				break;
-			case TYPE_LOADING:
-				if (mEmptyView!=null) mEmptyView.setVisibility(View.GONE);
-				if (mErrorView!=null) mErrorView.setVisibility(View.GONE);
-				if (mLoadingView!=null) {
-					mLoadingView.setVisibility(View.VISIBLE);
-					if (mLoadingAnimation != null && loadingAnimationView!=null) {
-						loadingAnimationView.startAnimation(mLoadingAnimation);
-					}
-					else if (loadingAnimationView!=null) {
-						loadingAnimationView.startAnimation(getRotateAnimation());
-					}
-				}				
-				break;
-			default:
-				break;
-			}
-		}
-	}
-	
-	private void refreshMessages() {
-		if (mEmptyMessageViewId>0 && mEmptyMessage!=null) ((TextView)mEmptyView.findViewById(mEmptyMessageViewId)).setText(mEmptyMessage);
-		if (mLoadingMessageViewId>0 && mLoadingMessage!=null) ((TextView)mLoadingView.findViewById(mLoadingMessageViewId)).setText(mLoadingMessage);
-		if (mErrorMessageViewId>0 && mErrorMessage!=null) ((TextView)mErrorView.findViewById(mErrorMessageViewId)).setText(mErrorMessage);
-	}
-
-	private void setDefaultValues() {
-		if (mEmptyView==null) {
-			mEmptyView = (ViewGroup) mInflater.inflate(R.layout.view_empty, null);
-			if (!(mEmptyMessageViewId>0)) mEmptyMessageViewId = R.id.textViewMessage;
-			if (mShowEmptyButton && mEmptyViewButtonId>0 && mEmptyButtonClickListener!=null) {
-				View emptyViewButton = mEmptyView.findViewById(mEmptyViewButtonId);
-				if (emptyViewButton != null) {
-					emptyViewButton.setOnClickListener(mEmptyButtonClickListener);
-					emptyViewButton.setVisibility(View.VISIBLE);
-				}
-			}
-			else if (mEmptyViewButtonId>0) {
-				View emptyViewButton = mEmptyView.findViewById(mEmptyViewButtonId);
-				emptyViewButton.setVisibility(View.GONE);
-			}
-		}
-		if (mLoadingView==null) {
-			mLoadingView = (ViewGroup) mInflater.inflate(R.layout.view_loading, null);
-			mLoadingAnimationViewId = R.id.imageViewLoading;
-			if (!(mLoadingMessageViewId>0)) mLoadingMessageViewId = R.id.textViewMessage;
-			if (mShowLoadingButton && mLoadingViewButtonId>0 && mLoadingButtonClickListener!=null) {
-				View loadingViewButton = mLoadingView.findViewById(mLoadingViewButtonId);
-				if (loadingViewButton != null) {
-					loadingViewButton.setOnClickListener(mLoadingButtonClickListener);
-					loadingViewButton.setVisibility(View.VISIBLE);
-				}
-			}
-			else if (mLoadingViewButtonId>0) {
-				View loadingViewButton = mLoadingView.findViewById(mLoadingViewButtonId);
-				loadingViewButton.setVisibility(View.GONE);
-			}
-		}
-		if (mErrorView==null) {
-			mErrorView = (ViewGroup) mInflater.inflate(R.layout.view_error, null);
-			if (!(mErrorMessageViewId>0)) mErrorMessageViewId = R.id.textViewMessage;
-			if (mShowErrorButton && mErrorViewButtonId>0 && mErrorButtonClickListener!=null) {
-				View errorViewButton = mErrorView.findViewById(mErrorViewButtonId);
-				if (errorViewButton != null) {
-					errorViewButton.setOnClickListener(mErrorButtonClickListener);
-					errorViewButton.setVisibility(View.VISIBLE);
-				}
-			}
-			else if (mErrorViewButtonId>0) {
-				View errorViewButton = mErrorView.findViewById(mErrorViewButtonId);
-				errorViewButton.setVisibility(View.GONE);
-			}
-		}
-	}
-	
-	private static Animation getRotateAnimation() {
-		final RotateAnimation rotateAnimation = new RotateAnimation(0, 360, Animation.RELATIVE_TO_SELF, .5f, Animation.RELATIVE_TO_SELF, .5f);
-		rotateAnimation.setDuration(1500);		
-		rotateAnimation.setInterpolator(new LinearInterpolator());
-		rotateAnimation.setRepeatCount(Animation.INFINITE);		
-		return rotateAnimation;
-	}
-	
-
-	// ---------------------------
-	// public methods
-	// ---------------------------
-	
-	/**
-	 * Constructor
-	 * @param context the context (preferred context is any activity)
-	 */
-	public EmptyLayout(Context context) {
-		mContext = context;
-		mInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-	}
-	
-	/**
-	 * Constructor
-	 * @param context the context (preferred context is any activity)
-	 * @param listView the list view for which this library is being used
-	 */
-	public EmptyLayout(Context context, ListView listView) {
-		mContext = context;
-		mInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-		mListView = listView;
-	}
-	
-	
-	/**
-	 * Shows the empty layout if the list is empty
-	 */
-	public void showEmpty() {
-		this.mEmptyType = TYPE_EMPTY;
-		changeEmptyType();
-	}
-
-	/**
-	 * Shows loading layout if the list is empty
-	 */
-	public void showLoading() {
-		this.mEmptyType = TYPE_LOADING;
-		changeEmptyType();
-	}
-
-	/**
-	 * Shows error layout if the list is empty
-	 */
-	public void showError() {
-		this.mEmptyType = TYPE_ERROR;
-		changeEmptyType();
-	}
-	
-	
+    // public methods
+    // ---------------------------
+
+    /**
+     * Constructor
+     *
+     * @param context the context (preferred context is any activity)
+     */
+    public EmptyLayout(Context context) {
+        mContext = context;
+        mInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+    }
+
+    /**
+     * Constructor
+     *
+     * @param context  the context (preferred context is any activity)
+     * @param listView the list view for which this library is being used
+     */
+    public EmptyLayout(Context context, ListView listView) {
+        mContext = context;
+        mInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+        mListView = listView;
+    }
+
+
+    /**
+     * Shows the empty layout if the list is empty
+     */
+    public void showEmpty() {
+        this.mEmptyType = TYPE_EMPTY;
+        changeEmptyType();
+    }
+
+    /**
+     * Shows loading layout if the list is empty
+     */
+    public void showLoading() {
+        this.mEmptyType = TYPE_LOADING;
+        changeEmptyType();
+    }
+
+    /**
+     * Shows error layout if the list is empty
+     */
+    public void showError() {
+        this.mEmptyType = TYPE_ERROR;
+        changeEmptyType();
+    }
+
+
 }

+ 1 - 1
app_core/common/src/main/java/com/core/widget/view/Activity/SearchLocationActivity.java

@@ -26,7 +26,7 @@ import com.core.base.OABaseActivity;
 import com.core.utils.BaiduMapUtil;
 import com.core.utils.ToastUtil;
 import com.core.widget.listener.EditChangeListener;
-import com.core.widget.view.EmptyLayout;
+import com.core.widget.EmptyLayout;
 import com.core.widget.view.adapter.SearchLocationAdapter;
 import com.core.widget.view.imp.ISearchView;
 import com.core.widget.view.imp.SearchPresenter;

+ 1 - 1
app_core/common/src/main/java/com/core/widget/view/Activity/SelectActivity.java

@@ -35,7 +35,7 @@ import com.core.model.SelectBean;
 import com.core.net.http.ViewUtil;
 import com.core.utils.CommonUtil;
 import com.core.widget.VoiceSearchView;
-import com.core.widget.view.EmptyLayout;
+import com.core.widget.EmptyLayout;
 
 import java.util.ArrayList;
 import java.util.HashMap;

+ 0 - 627
app_core/common/src/main/java/com/core/widget/view/EmptyLayout.java

@@ -1,627 +0,0 @@
-package com.core.widget.view;
-
-
-import android.app.Activity;
-import android.content.Context;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.animation.Animation;
-import android.view.animation.AnimationUtils;
-import android.view.animation.LinearInterpolator;
-import android.view.animation.RotateAnimation;
-import android.widget.ListView;
-import android.widget.RelativeLayout;
-import android.widget.RelativeLayout.LayoutParams;
-import android.widget.TextView;
-
-import com.core.app.MyApplication;
-import com.core.app.R;
-
-public class EmptyLayout {
-
-	private Context mContext;
-	private ViewGroup mLoadingView;
-	private ViewGroup mEmptyView;
-	private ViewGroup mErrorView;
-	private Animation mLoadingAnimation;
-	private ListView mListView;
-	private int mErrorMessageViewId;
-	private int mEmptyMessageViewId;
-	private int mLoadingMessageViewId;
-	private LayoutInflater mInflater;
-	private boolean mViewsAdded;
-	private int mLoadingAnimationViewId;	
-	private View.OnClickListener mLoadingButtonClickListener;
-    private View.OnClickListener mEmptyButtonClickListener;
-    private View.OnClickListener mErrorButtonClickListener;
-
-	// ---------------------------
-	// static variables 
-	// ---------------------------
-	/**
-	 * The empty state
-	 */
-	public final static int TYPE_EMPTY = 1;
-	/**
-	 * The loading state
-	 */
-	public final static int TYPE_LOADING = 2;
-	/**
-	 * The error state
-	 */
-	public final static int TYPE_ERROR = 3;	
-
-	// ---------------------------
-	// default values
-	// ---------------------------
-	private int mEmptyType = TYPE_LOADING;
-	private String mErrorMessage = MyApplication.getInstance().getString(R.string.error_system_findunknow_error);
-	private String mEmptyMessage = MyApplication.getInstance().getString(R.string.common_list_empty);
-	private String mLoadingMessage = "";
-	private int mLoadingViewButtonId = R.id.buttonLoading;
-	private int mErrorViewButtonId = R.id.buttonError;
-	private int mEmptyViewButtonId = R.id.buttonEmpty;
-	private boolean mShowEmptyButton = true;
-	private boolean mShowLoadingButton = true;
-	private boolean mShowErrorButton = true;
-
-	// ---------------------------
-	// getters and setters
-	// ---------------------------
-	/**
-	 * Gets the loading layout
-	 * @return the loading layout
-	 */
-	public ViewGroup getLoadingView() {
-		return mLoadingView;
-	}
-	
-	/**
-	 * Sets loading layout
-	 * @param loadingView the layout to be shown when the list is loading
-	 */
-	public void setLoadingView(ViewGroup loadingView) {
-		this.mLoadingView = loadingView;
-	}
-	
-	/**
-	 * Sets loading layout resource
-	 * @param res the resource of the layout to be shown when the list is loading
-	 */
-	public void setLoadingViewRes(int res){
-		this.mLoadingView = (ViewGroup) mInflater.inflate(res, null);
-	}
-	
-	/**
-	 * Gets the empty layout
-	 * @return the empty layout
-	 */
-	public ViewGroup getEmptyView() {
-		return mEmptyView;
-	}
-	
-	/**
-	 * Sets empty layout
-	 * @param emptyView the layout to be shown when no items are available to load in the list
-	 */
-	public void setEmptyView(ViewGroup emptyView) {
-		this.mEmptyView = emptyView;
-	}
-	
-	/**
-	 * Sets empty layout resource
-	 * @param res the resource of the layout to be shown when no items are available to load in the list
-	 */
-	public void setEmptyViewRes(int res){
-		this.mEmptyView = (ViewGroup) mInflater.inflate(res, null);
-	}
-	
-	/**
-	 * Gets the error layout
-	 * @return the error layout
-	 */
-	public ViewGroup getErrorView() {
-		return mErrorView;
-	}
-	
-	/**
-	 * Sets error layout
-	 * @param errorView the layout to be shown when list could not be loaded due to some error
-	 */
-	public void setErrorView(ViewGroup errorView) {
-		this.mErrorView = errorView;
-	}
-	
-	/**
-	 * Sets error layout resource
-	 * @param res the resource of the layout to be shown when list could not be loaded due to some error
-	 */
-	public void setErrorViewRes(int res){
-		this.mErrorView = (ViewGroup) mInflater.inflate(res, null);
-	}
-	
-	/**
-	 * Gets the loading animation
-	 * @return the loading animation
-	 */
-	public Animation getLoadingAnimation() {
-		return mLoadingAnimation;
-	}
-	
-	/**
-	 * Sets the loading animation
-	 * @param animation the animation to play when the list is being loaded
-	 */
-	public void setLoadingAnimation(Animation animation) {
-		this.mLoadingAnimation = animation;
-	}
-	
-	/**
-	 * Sets the resource of loading animation
-	 * @param animationResource the animation resource to play when the list is being loaded
-	 */
-	public void setLoadingAnimationRes(int animationResource) {
-		mLoadingAnimation = AnimationUtils.loadAnimation(mContext, animationResource);
-	}
-	
-	/**
-	 * Gets the list view for which this library is being used
-	 * @return the list view
-	 */
-	public ListView getListView() {
-		return mListView;
-	}
-	
-	/**
-	 * Sets the list view for which this library is being used
-	 * @param listView
-	 */
-	public void setListView(ListView listView) {
-		this.mListView = listView;
-	}
-	
-	/**
-	 * Gets the last set state of the list view
-	 * @return loading or empty or error
-	 */
-	public int getEmptyType() {
-		return mEmptyType;
-	}
-	
-	/**
-	 * Sets the state of the empty view of the list view
-	 * @param emptyType loading or empty or error
-	 */
-	public void setEmptyType(int emptyType) {
-		this.mEmptyType = emptyType;
-		changeEmptyType();
-	}
-	
-	/**
-	 * Gets the message which is shown when the list could not be loaded due to some error
-	 * @return the error message 
-	 */
-	public String getErrorMessage() {
-		return mErrorMessage;
-	}
-	
-	/**
-	 * Sets the message to be shown when the list could not be loaded due to some error
-	 * @param errorMessage the error message
-	 * @param messageViewId the id of the text view within the error layout whose text will be changed into this message
-	 */
-	public void setErrorMessage(String errorMessage, int messageViewId) {
-		this.mErrorMessage = errorMessage;
-		this.mErrorMessageViewId = messageViewId;
-	}
-	
-	/**
-	 * Sets the message to be shown when the list could not be loaded due to some error
-	 * @param errorMessage the error message
-	 */
-	public void setErrorMessage(String errorMessage) {
-		this.mErrorMessage = errorMessage;
-	}
-	
-	/**
-	 * Gets the message which will be shown when the list will be empty for not having any item to display
-	 * @return the message which will be shown when the list will be empty for not having any item to display
-	 */
-	public String getEmptyMessage() {
-		return mEmptyMessage;
-	}
-	
-	/**
-	 * Sets the message to be shown when the list will be empty for not having any item to display
-	 * @param emptyMessage the message
-	 * @param messageId the id of the text view within the empty layout whose text will be changed into this message
-	 */
-	public void setEmptyMessage(String emptyMessage, int messageViewId) {
-		this.mEmptyMessage = emptyMessage;
-		this.mEmptyMessageViewId = messageViewId;
-	}
-	
-	/**
-	 * Sets the message to be shown when the list will be empty for not having any item to display
-	 * @param emptyMessage the message
-	 */
-	public void setEmptyMessage(String emptyMessage) {
-		this.mEmptyMessage = emptyMessage;
-	}
-	
-	/**
-	 * Gets the message which will be shown when the list is being loaded
-	 * @return
-	 */
-	public String getLoadingMessage() {
-		return mLoadingMessage;
-	}
-	
-	/**
-	 * Sets the message to be shown when the list is being loaded
-	 * @param loadingMessage the message
-	 * @param messageViewId the id of the text view within the loading layout whose text will be changed into this message
-	 */
-	public void setLoadingMessage(String loadingMessage, int messageViewId) {
-		this.mLoadingMessage = loadingMessage;
-		this.mLoadingMessageViewId = messageViewId;
-	}
-	
-	/**
-	 * Sets the message to be shown when the list is being loaded
-	 * @param loadingMessage the message
-	 */
-	public void setLoadingMessage(String loadingMessage) {
-		this.mLoadingMessage = loadingMessage;
-	}
-	
-	/**
-	 * Gets the view in the loading layout which will be animated when the list is being loaded
-	 * @return the view in the loading layout which will be animated when the list is being loaded
-	 */
-	public int getLoadingAnimationViewId() {
-		return mLoadingAnimationViewId;
-	}
-	
-	/**
-	 * Sets the view in the loading layout which will be animated when the list is being loaded
-	 * @param loadingAnimationViewId the id of the view
-	 */
-	public void setLoadingAnimationViewId(int loadingAnimationViewId) {
-		this.mLoadingAnimationViewId = loadingAnimationViewId;
-	}	
-
-    /**
-     * Gets the OnClickListener which perform when LoadingView was click
-     * @return
-     */
-    public View.OnClickListener getLoadingButtonClickListener() {
-        return mLoadingButtonClickListener;
-    }
-
-    /**
-     * Sets the OnClickListener to LoadingView
-     * @param loadingButtonClickListener OnClickListener Object
-     */
-    public void setLoadingButtonClickListener(View.OnClickListener loadingButtonClickListener) {
-        this.mLoadingButtonClickListener = loadingButtonClickListener;
-    }
-    
-    /**
-     * Gets the OnClickListener which perform when EmptyView was click
-     * @return
-     */
-    public View.OnClickListener getEmptyButtonClickListener() {
-        return mEmptyButtonClickListener;
-    }
-
-    /**
-     * Sets the OnClickListener to EmptyView
-     * @param emptyButtonClickListener OnClickListener Object
-     */
-    public void setEmptyButtonClickListener(View.OnClickListener emptyButtonClickListener) {
-        this.mEmptyButtonClickListener = emptyButtonClickListener;
-    }
-    
-    /**
-     * Gets the OnClickListener which perform when ErrorView was click
-     * @return
-     */
-    public View.OnClickListener getErrorButtonClickListener() {
-        return mErrorButtonClickListener;
-    }
-
-    /**
-     * Sets the OnClickListener to ErrorView
-     * @param errorButtonClickListener OnClickListener Object
-     */
-    public void setErrorButtonClickListener(View.OnClickListener errorButtonClickListener) {
-        this.mErrorButtonClickListener = errorButtonClickListener;
-    }
-
-    /**
-     * Gets if a button is shown in the empty view
-     * @return if a button is shown in the empty view
-     */
-    public boolean isEmptyButtonShown() {
-		return mShowEmptyButton;
-	}
-
-    /**
-     * Sets if a button will be shown in the empty view
-     * @param showEmptyButton will a button be shown in the empty view
-     */
-	public void setShowEmptyButton(boolean showEmptyButton) {
-		this.mShowEmptyButton = showEmptyButton;
-	}
-
-	/**
-     * Gets if a button is shown in the loading view
-     * @return if a button is shown in the loading view
-     */
-	public boolean isLoadingButtonShown() {
-		return mShowLoadingButton;
-	}
-
-	/**
-     * Sets if a button will be shown in the loading view
-     * @param showEmptyButton will a button be shown in the loading view
-     */
-	public void setShowLoadingButton(boolean showLoadingButton) {
-		this.mShowLoadingButton = showLoadingButton;
-	}
-
-	/**
-     * Gets if a button is shown in the error view
-     * @return if a button is shown in the error view
-     */
-	public boolean isErrorButtonShown() {
-		return mShowErrorButton;
-	}
-
-	/**
-     * Sets if a button will be shown in the error view
-     * @param showEmptyButton will a button be shown in the error view
-     */
-	public void setShowErrorButton(boolean showErrorButton) {
-		this.mShowErrorButton = showErrorButton;
-	}
-    
-	/**
-	 * Gets the ID of the button in the loading view
-	 * @return the ID of the button in the loading view
-	 */
-	public int getmLoadingViewButtonId() {
-		return mLoadingViewButtonId;
-	}	
-	
-	/**
-	 * Sets the ID of the button in the loading view. This ID is required if you want the button the loading view to be click-able.
-	 * @param loadingViewButtonId the ID of the button in the loading view
-	 */
-	public void setLoadingViewButtonId(int loadingViewButtonId) {
-		this.mLoadingViewButtonId = loadingViewButtonId;
-	}
-
-	/**
-	 * Gets the ID of the button in the error view
-	 * @return the ID of the button in the error view
-	 */
-	public int getErrorViewButtonId() {
-		return mErrorViewButtonId;
-	}
-
-	/**
-	 * Sets the ID of the button in the error view. This ID is required if you want the button the error view to be click-able.
-	 * @param errorViewButtonId the ID of the button in the error view
-	 */
-	public void setErrorViewButtonId(int errorViewButtonId) {
-		this.mErrorViewButtonId = errorViewButtonId;
-	}
-
-	/**
-	 * Gets the ID of the button in the empty view
-	 * @return the ID of the button in the empty view
-	 */
-	public int getEmptyViewButtonId() {
-		return mEmptyViewButtonId;
-	}
-	
-	/**
-	 * Sets the ID of the button in the empty view. This ID is required if you want the button the empty view to be click-able.
-	 * @param emptyViewButtonId the ID of the button in the empty view
-	 */
-	public void setEmptyViewButtonId(int emptyViewButtonId) {
-		this.mEmptyViewButtonId = emptyViewButtonId;
-	}
-
-    
-
-
-    
-
-    // ---------------------------
-	// private methods
-	// ---------------------------	
-
-	private void changeEmptyType() {
-		
-		setDefaultValues();
-		refreshMessages();
-
-		// insert views in the root view
-		if (!mViewsAdded) {
-			LayoutParams lp = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
-			lp.addRule(RelativeLayout.CENTER_HORIZONTAL);
-			lp.addRule(RelativeLayout.CENTER_VERTICAL);
-			
-			RelativeLayout rl = new RelativeLayout(mContext);
-//			rl.setBackgroundColor(mContext.getResources().getColor(R.color.lightpink));
-			rl.setLayoutParams(lp);
-			if (mEmptyView!=null) rl.addView(mEmptyView);
-			if (mLoadingView!=null) rl.addView(mLoadingView);
-			if (mErrorView!=null) rl.addView(mErrorView);
-			mViewsAdded = true;			
-
-			ViewGroup parent = (ViewGroup) mListView.getParent();
-			parent.addView(rl);
-			mListView.setEmptyView(rl);
-		}
-		
-		
-		// change empty type
-		if (mListView!=null) {
-			View loadingAnimationView = null;
-			if (mLoadingAnimationViewId > 0) loadingAnimationView = ((Activity) mContext).findViewById(mLoadingAnimationViewId); 
-			switch (mEmptyType) {
-			case TYPE_EMPTY:
-				if (mEmptyView!=null) mEmptyView.setVisibility(View.VISIBLE);
-				if (mErrorView!=null) mErrorView.setVisibility(View.GONE);
-				if (mLoadingView!=null) {
-					mLoadingView.setVisibility(View.GONE); 
-					if (loadingAnimationView!=null && loadingAnimationView.getAnimation()!=null) loadingAnimationView.getAnimation().cancel();
-				}
-				break;
-			case TYPE_ERROR:
-				if (mEmptyView!=null) mEmptyView.setVisibility(View.GONE);
-				if (mErrorView!=null) mErrorView.setVisibility(View.VISIBLE);
-				if (mLoadingView!=null) {
-					mLoadingView.setVisibility(View.GONE); 
-					if (loadingAnimationView!=null && loadingAnimationView.getAnimation()!=null) loadingAnimationView.getAnimation().cancel();
-				}
-				break;
-			case TYPE_LOADING:
-				if (mEmptyView!=null) mEmptyView.setVisibility(View.GONE);
-				if (mErrorView!=null) mErrorView.setVisibility(View.GONE);
-				if (mLoadingView!=null) {
-					mLoadingView.setVisibility(View.VISIBLE);
-					if (mLoadingAnimation != null && loadingAnimationView!=null) {
-						loadingAnimationView.startAnimation(mLoadingAnimation);
-					}
-					else if (loadingAnimationView!=null) {
-						loadingAnimationView.startAnimation(getRotateAnimation());
-					}
-				}				
-				break;
-			default:
-				break;
-			}
-		}
-	}
-	
-	private void refreshMessages() {
-		if (mEmptyMessageViewId>0 && mEmptyMessage!=null) ((TextView)mEmptyView.findViewById(mEmptyMessageViewId)).setText(mEmptyMessage);
-		if (mLoadingMessageViewId>0 && mLoadingMessage!=null) ((TextView)mLoadingView.findViewById(mLoadingMessageViewId)).setText(mLoadingMessage);
-		if (mErrorMessageViewId>0 && mErrorMessage!=null) ((TextView)mErrorView.findViewById(mErrorMessageViewId)).setText(mErrorMessage);
-	}
-
-	private void setDefaultValues() {
-		if (mEmptyView==null) {
-			mEmptyView = (ViewGroup) mInflater.inflate(R.layout.view_empty, null);
-			if (!(mEmptyMessageViewId>0)) mEmptyMessageViewId = R.id.textViewMessage;
-			if (mShowEmptyButton && mEmptyViewButtonId>0 && mEmptyButtonClickListener!=null) {
-				View emptyViewButton = mEmptyView.findViewById(mEmptyViewButtonId);
-				if (emptyViewButton != null) {
-					emptyViewButton.setOnClickListener(mEmptyButtonClickListener);
-					emptyViewButton.setVisibility(View.VISIBLE);
-				}
-			}
-			else if (mEmptyViewButtonId>0) {
-				View emptyViewButton = mEmptyView.findViewById(mEmptyViewButtonId);
-				emptyViewButton.setVisibility(View.GONE);
-			}
-		}
-		if (mLoadingView==null) {
-			mLoadingView = (ViewGroup) mInflater.inflate(R.layout.view_loading, null);
-			mLoadingAnimationViewId = R.id.imageViewLoading;
-			if (!(mLoadingMessageViewId>0)) mLoadingMessageViewId = R.id.textViewMessage;
-			if (mShowLoadingButton && mLoadingViewButtonId>0 && mLoadingButtonClickListener!=null) {
-				View loadingViewButton = mLoadingView.findViewById(mLoadingViewButtonId);
-				if (loadingViewButton != null) {
-					loadingViewButton.setOnClickListener(mLoadingButtonClickListener);
-					loadingViewButton.setVisibility(View.VISIBLE);
-				}
-			}
-			else if (mLoadingViewButtonId>0) {
-				View loadingViewButton = mLoadingView.findViewById(mLoadingViewButtonId);
-				loadingViewButton.setVisibility(View.GONE);
-			}
-		}
-		if (mErrorView==null) {
-			mErrorView = (ViewGroup) mInflater.inflate(R.layout.view_error, null);
-			if (!(mErrorMessageViewId>0)) mErrorMessageViewId = R.id.textViewMessage;
-			if (mShowErrorButton && mErrorViewButtonId>0 && mErrorButtonClickListener!=null) {
-				View errorViewButton = mErrorView.findViewById(mErrorViewButtonId);
-				if (errorViewButton != null) {
-					errorViewButton.setOnClickListener(mErrorButtonClickListener);
-					errorViewButton.setVisibility(View.VISIBLE);
-				}
-			}
-			else if (mErrorViewButtonId>0) {
-				View errorViewButton = mErrorView.findViewById(mErrorViewButtonId);
-				errorViewButton.setVisibility(View.GONE);
-			}
-		}
-	}
-	
-	private static Animation getRotateAnimation() {
-		final RotateAnimation rotateAnimation = new RotateAnimation(0, 360, Animation.RELATIVE_TO_SELF, .5f, Animation.RELATIVE_TO_SELF, .5f);
-		rotateAnimation.setDuration(1500);		
-		rotateAnimation.setInterpolator(new LinearInterpolator());
-		rotateAnimation.setRepeatCount(Animation.INFINITE);		
-		return rotateAnimation;
-	}
-	
-
-	// ---------------------------
-	// public methods
-	// ---------------------------
-	
-	/**
-	 * Constructor
-	 * @param context the context (preferred context is any activity)
-	 */
-	public EmptyLayout(Context context) {
-		mContext = context;
-		mInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-	}
-	
-	/**
-	 * Constructor
-	 * @param context the context (preferred context is any activity)
-	 * @param listView the list view for which this library is being used
-	 */
-	public EmptyLayout(Context context, ListView listView) {
-		mContext = context;
-		mInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-		mListView = listView;
-	}
-	
-	
-	/**
-	 * Shows the empty layout if the list is empty
-	 */
-	public void showEmpty() {
-		this.mEmptyType = TYPE_EMPTY;
-		changeEmptyType();
-	}
-
-	/**
-	 * Shows loading layout if the list is empty
-	 */
-	public void showLoading() {
-		this.mEmptyType = TYPE_LOADING;
-		changeEmptyType();
-	}
-
-	/**
-	 * Shows error layout if the list is empty
-	 */
-	public void showError() {
-		this.mEmptyType = TYPE_ERROR;
-		changeEmptyType();
-	}
-	
-	
-}

BIN
app_core/common/src/main/res/drawable-hdpi/gif_empty_view.gif


BIN
app_core/common/src/main/res/drawable-hdpi/ic_empty_image1.png


BIN
app_core/common/src/main/res/drawable-hdpi/ic_empty_image2.png


BIN
app_core/common/src/main/res/drawable-hdpi/ic_empty_image3.png


BIN
app_core/common/src/main/res/drawable-xhdpi/gif_empty_view.gif


BIN
app_core/common/src/main/res/drawable-xhdpi/ic_empty_image1.png


BIN
app_core/common/src/main/res/drawable-xhdpi/ic_empty_image2.png


BIN
app_core/common/src/main/res/drawable-xhdpi/ic_empty_image3.png


BIN
app_core/common/src/main/res/drawable-xxhdpi/ic_empty_image1.png


BIN
app_core/common/src/main/res/drawable-xxhdpi/ic_empty_image2.png


BIN
app_core/common/src/main/res/drawable-xxhdpi/ic_empty_image3.png


+ 2 - 2
app_core/common/src/main/res/layout/activity_booking_set.xml

@@ -18,7 +18,7 @@
             android:layout_centerVertical="true"
             android:gravity="center"
             android:text="@string/taskdetail_startime"
-            android:textColor="@color/grgray"
+            android:textColor="@color/black"
             android:textSize="@dimen/commonSettingItemTextSize" />
 
         <TextView
@@ -55,7 +55,7 @@
             android:layout_centerVertical="true"
             android:gravity="center"
             android:text="@string/taskdetail_endtime"
-            android:textColor="@color/grgray"
+            android:textColor="@color/black"
             android:textSize="@dimen/commonSettingItemTextSize" />
 
         <TextView

+ 28 - 6
app_core/common/src/main/res/layout/view_empty.xml

@@ -1,16 +1,20 @@
 <?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout
     android:id="@+id/rl_empty"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:background="@color/white"
     android:orientation="vertical">
 
     <RelativeLayout
         android:layout_width="match_parent"
-        android:layout_height="match_parent">
+        android:layout_height="match_parent"
+        android:visibility="gone">
 
         <TextView
-            android:id="@+id/textViewMessage"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_centerInParent="true"
@@ -24,14 +28,32 @@
             android:id="@+id/buttonEmpty"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_below="@+id/textViewMessage"
             android:layout_centerHorizontal="true"
             android:layout_marginTop="16dp"
             android:text="@string/empty_button"
             android:visibility="gone" />
     </RelativeLayout>
 
-    <TextView
+    <LinearLayout
         android:layout_width="wrap_content"
-        android:layout_height="wrap_content" />
+        android:layout_height="wrap_content"
+        android:layout_centerInParent="true"
+        android:gravity="center_horizontal"
+        android:orientation="vertical">
+
+        <pl.droidsonroids.gif.GifImageView
+            android:id="@+id/view_empty_gif"
+            android:layout_width="110dp"
+            android:layout_height="110dp"
+            android:src="@drawable/gif_empty_view" />
+
+        <TextView
+            android:id="@+id/textViewMessage"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginBottom="80dp"
+            android:text="数据为空"
+            android:textSize="14sp"
+            />
+    </LinearLayout>
 </RelativeLayout>

+ 1 - 1
app_core/common/src/main/res/values/colors.xml

@@ -37,7 +37,7 @@
     <color name="pop_bg">#aeaeae</color>
     <color name="item_color2">@color/white</color>
     <color name="item_text">#cca0a0a0</color>
-    <color name="item_line">#f2f2f2</color>
+    <color name="item_line">#DBDBDB</color>
     <color name="antionbarcolor">#646464</color>
     <color name="base_bg">#EBE9E9</color>
     <color name="antionbaritemcolor">#a3b2cf</color>

+ 1 - 1
app_core/common/src/main/res/values/dimens.xml

@@ -22,7 +22,7 @@
     <dimen name="oa_statistics_date_minheight">30dp</dimen>
     <!-- end oa 考勤统计页面-->
     <dimen name="next_width">10.0dip</dimen>
-    <dimen name="line">1px</dimen>
+    <dimen name="line">2px</dimen>
     <dimen name="line_big">7.0dip</dimen>
     <dimen name="line_min">2.0dip</dimen>
     <dimen name="next_height">15.0dip</dimen>

+ 1 - 1
app_modular/appbooking/src/main/java/com/modular/booking/activity/business/BBCompanyListActivity.java

@@ -27,7 +27,7 @@ import com.core.model.SelectCollisionTurnBean;
 import com.core.model.SelectEmUser;
 import com.core.utils.CommonUtil;
 import com.core.widget.VoiceSearchView;
-import com.core.widget.view.EmptyLayout;
+import com.core.widget.EmptyLayout;
 import com.me.network.app.http.HttpClient;
 import com.me.network.app.http.Method;
 import com.me.network.app.http.impl.RetrofitImpl;

+ 2 - 2
app_modular/applogin/src/main/res/layout/activity_modify_password_mode.xml

@@ -22,7 +22,7 @@
         <TextView
             style="@style/register_edittext_style"
             android:layout_height="48dp"
-            android:drawableRight="@drawable/go"
+            android:drawableRight="@drawable/oa_next"
             android:gravity="center_vertical"
             android:paddingLeft="10dp"
             android:paddingRight="10dp"
@@ -52,7 +52,7 @@
         <TextView
             style="@style/register_edittext_style"
             android:layout_height="48dp"
-            android:drawableRight="@drawable/go"
+            android:drawableRight="@drawable/oa_next"
             android:gravity="center_vertical"
             android:paddingLeft="10dp"
             android:paddingRight="10dp"

+ 140 - 134
app_modular/applogin/src/main/res/layout/activity_modify_password_phone.xml

@@ -4,153 +4,159 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent">
 
-    <LinearLayout
+    <ScrollView
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:orientation="vertical"
-        android:padding="20dp">
-
-        <LinearLayout
-            android:layout_width="match_parent"
-            android:layout_height="40dp"
-            android:background="@drawable/shape_gray_slight_corner_white_bg"
-            android:gravity="center_vertical"
-            android:orientation="horizontal">
-
-            <ImageView
-                android:layout_width="30dp"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="10dp"
-                android:src="@drawable/ic_modify_phone" />
-
-            <com.core.widget.ClearEditText
-                android:id="@+id/modify_password_phone_mobile_et"
-                style="@style/register_edittext_style"
-                android:hint="手机号"
-                android:inputType="number"
-                android:paddingLeft="10dp"
-                android:paddingRight="10dp"
-                android:textColor="@color/black" />
-        </LinearLayout>
+        android:fillViewport="true">
 
         <LinearLayout
             android:layout_width="match_parent"
-            android:layout_height="40dp"
-            android:layout_marginTop="8dp"
-            android:background="@drawable/shape_gray_slight_corner_white_bg"
-            android:gravity="center_vertical"
-            android:orientation="horizontal">
-
-            <ImageView
-                android:layout_width="30dp"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="10dp"
-                android:src="@drawable/ic_verification_code" />
-
-            <com.core.widget.ClearEditText
-                android:id="@+id/modify_password_phone_code_et"
-                style="@style/register_edittext_style"
-                android:layout_width="0dp"
-                android:layout_weight="1"
-                android:hint="短信验证码"
-                android:paddingLeft="10dp"
-                android:paddingRight="10dp"
-                android:textColor="@color/black" />
-
-            <View
-                android:layout_width="1dp"
-                android:layout_height="match_parent"
-                android:layout_margin="10dp"
-                android:background="@color/gray" />
+            android:layout_height="match_parent"
+            android:orientation="vertical"
+            android:padding="20dp">
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="40dp"
+                android:background="@drawable/shape_gray_slight_corner_white_bg"
+                android:gravity="center_vertical"
+                android:orientation="horizontal">
+
+                <ImageView
+                    android:layout_width="30dp"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="10dp"
+                    android:src="@drawable/ic_modify_phone" />
+
+                <com.core.widget.ClearEditText
+                    android:id="@+id/modify_password_phone_mobile_et"
+                    style="@style/register_edittext_style"
+                    android:hint="手机号"
+                    android:inputType="number"
+                    android:paddingLeft="10dp"
+                    android:paddingRight="10dp"
+                    android:textColor="@color/black" />
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="40dp"
+                android:layout_marginTop="8dp"
+                android:background="@drawable/shape_gray_slight_corner_white_bg"
+                android:gravity="center_vertical"
+                android:orientation="horizontal">
+
+                <ImageView
+                    android:layout_width="30dp"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="10dp"
+                    android:src="@drawable/ic_verification_code" />
+
+                <com.core.widget.ClearEditText
+                    android:id="@+id/modify_password_phone_code_et"
+                    style="@style/register_edittext_style"
+                    android:layout_width="0dp"
+                    android:layout_weight="1"
+                    android:hint="短信验证码"
+                    android:paddingLeft="10dp"
+                    android:paddingRight="10dp"
+                    android:textColor="@color/black" />
+
+                <View
+                    android:layout_width="1dp"
+                    android:layout_height="match_parent"
+                    android:layout_margin="10dp"
+                    android:background="@color/gray" />
+
+                <TextView
+                    android:id="@+id/modify_password_phone_code_btn"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginRight="10dp"
+                    android:text="@string/obtain_verify_code"
+                    android:textColor="@color/titleBlue" />
+            </LinearLayout>
 
             <TextView
-                android:id="@+id/modify_password_phone_code_btn"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginRight="10dp"
-                android:text="@string/obtain_verify_code"
-                android:textColor="@color/titleBlue" />
-        </LinearLayout>
-
-        <TextView
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="16dp"
-            android:text="*密码须为8-20字符的英文、数字混合"
-            android:textColor="@color/red"
-            android:textSize="12sp" />
-
-        <LinearLayout
-            android:id="@+id/modify_password_phone_password_ll"
-            android:layout_width="match_parent"
-            android:layout_height="40dp"
-            android:layout_marginTop="4dp"
-            android:background="@drawable/selector_edittext_bg"
-            android:enabled="false"
-            android:gravity="center_vertical"
-            android:orientation="horizontal">
-
-            <ImageView
-                android:layout_width="30dp"
+                android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_marginLeft="10dp"
-                android:src="@drawable/ic_password_reset" />
-
-            <com.core.widget.ClearEditText
-                android:id="@+id/modify_password_phone_password_et"
-                style="@style/register_edittext_style"
+                android:layout_marginTop="16dp"
+                android:text="*密码须为8-20字符的英文、数字混合"
+                android:textColor="@color/red"
+                android:textSize="12sp" />
+
+            <LinearLayout
+                android:id="@+id/modify_password_phone_password_ll"
+                android:layout_width="match_parent"
+                android:layout_height="40dp"
+                android:layout_marginTop="4dp"
+                android:background="@drawable/selector_edittext_bg"
                 android:enabled="false"
-                android:hint="新密码"
-                android:inputType="textPassword"
-                android:paddingLeft="10dp"
-                android:paddingRight="10dp"
-                android:textColor="@color/black" />
-        </LinearLayout>
-
-        <com.core.widget.StrengthView
-            android:id="@+id/modify_password_phone_strength_sv"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:paddingBottom="10dp"
-            android:paddingLeft="10dp"
-            android:paddingTop="10dp"
-            android:visibility="gone" />
-
-        <LinearLayout
-            android:id="@+id/modify_password_phone_password_confirm_ll"
-            android:layout_width="match_parent"
-            android:layout_height="40dp"
-            android:layout_marginTop="8dp"
-            android:background="@drawable/selector_edittext_bg"
-            android:enabled="false"
-            android:gravity="center_vertical"
-            android:orientation="horizontal">
-
-            <ImageView
-                android:layout_width="30dp"
+                android:gravity="center_vertical"
+                android:orientation="horizontal">
+
+                <ImageView
+                    android:layout_width="30dp"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="10dp"
+                    android:src="@drawable/ic_password_reset" />
+
+                <com.core.widget.ClearEditText
+                    android:id="@+id/modify_password_phone_password_et"
+                    style="@style/register_edittext_style"
+                    android:enabled="false"
+                    android:hint="新密码"
+                    android:inputType="textPassword"
+                    android:paddingLeft="10dp"
+                    android:paddingRight="10dp"
+                    android:textColor="@color/black" />
+            </LinearLayout>
+
+            <com.core.widget.StrengthView
+                android:id="@+id/modify_password_phone_strength_sv"
+                android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_marginLeft="10dp"
-                android:src="@drawable/ic_password_reset" />
+                android:paddingBottom="10dp"
+                android:paddingLeft="10dp"
+                android:paddingTop="10dp"
+                android:visibility="gone" />
+
+            <LinearLayout
+                android:id="@+id/modify_password_phone_password_confirm_ll"
+                android:layout_width="match_parent"
+                android:layout_height="40dp"
+                android:layout_marginTop="8dp"
+                android:background="@drawable/selector_edittext_bg"
+                android:enabled="false"
+                android:gravity="center_vertical"
+                android:orientation="horizontal">
+
+                <ImageView
+                    android:layout_width="30dp"
+                    android:layout_height="wrap_content"
+                    android:layout_marginLeft="10dp"
+                    android:src="@drawable/ic_password_reset" />
+
+                <com.core.widget.ClearEditText
+                    android:id="@+id/modify_password_phone_password_confirm_et"
+                    style="@style/register_edittext_style"
+                    android:enabled="false"
+                    android:hint="确认密码"
+                    android:inputType="textPassword"
+                    android:paddingLeft="10dp"
+                    android:paddingRight="10dp"
+                    android:textColor="@color/black" />
+            </LinearLayout>
 
-            <com.core.widget.ClearEditText
-                android:id="@+id/modify_password_phone_password_confirm_et"
-                style="@style/register_edittext_style"
+            <TextView
+                android:id="@+id/modify_password_phone_confirm_tv"
+                style="@style/commonButtonStyle"
+                android:layout_marginTop="20dp"
                 android:enabled="false"
-                android:hint="确认密码"
-                android:inputType="textPassword"
-                android:paddingLeft="10dp"
-                android:paddingRight="10dp"
-                android:textColor="@color/black" />
+                android:text="@string/app_dialog_ok"
+                />
         </LinearLayout>
-
-        <TextView
-            android:id="@+id/modify_password_phone_confirm_tv"
-            style="@style/commonButtonStyle"
-            android:layout_marginTop="20dp"
-            android:enabled="false"
-            android:text="@string/app_dialog_ok"
-            />
-    </LinearLayout>
+    </ScrollView>
 
     <LinearLayout
         android:id="@+id/modify_password_success_ll"

+ 1 - 1
app_modular/appme/src/main/java/com/uas/appme/settings/activity/SettingActivity.java

@@ -587,7 +587,7 @@ public class SettingActivity extends SupportToolBarActivity implements View.OnCl
         if (setWindow == null) initPopupWindow();
         setWindow.showAtLocation(getWindow().getDecorView().
                 findViewById(android.R.id.content), Gravity.BOTTOM, 0, 0);
-        DisplayUtil.backgroundAlpha(this, 0.4f);
+        DisplayUtil.backgroundAlpha(this, 0.7f);
     }
 
     private void initPopupWindow() {