Improve download

This commit is contained in:
seven332 committed 2015-08-22 23:51:57 +08:00
1 parent 9b7ebdff61
commit 4d6bcd8b79
36 files changed
+1246 -138

No files matched your search

@@ -48,7 +48,7 @@ public class FabLayout extends ViewGroup implements View.OnClickListener {
private boolean mAutoCancel = true;
private float mMainFabCenterY = -1f;
private OnCancelListener mOnCancelListener;
private OnExpandListener mOnExpandListener;
public FabLayout(Context context) {
super(context);
@@ -196,8 +196,8 @@ public class FabLayout extends ViewGroup implements View.OnClickListener {
}
}
public void setOnCancelListener(OnCancelListener listener) {
mOnCancelListener = listener;
public void setOnExpandListener(OnExpandListener listener) {
mOnExpandListener = listener;
}
public void setAutoCancel(boolean autoCancel) {
@@ -258,6 +258,10 @@ public class FabLayout extends ViewGroup implements View.OnClickListener {
}
}
}
if (mOnExpandListener != null) {
mOnExpandListener.onExpand(expanded);
}
}
}
@@ -314,9 +318,6 @@ public class FabLayout extends ViewGroup implements View.OnClickListener {
@Override
public void onClick(View v) {
setExpanded(false);
if (mOnCancelListener != null) {
mOnCancelListener.onCancel(this);
}
}
@Override
@@ -343,7 +344,7 @@ public class FabLayout extends ViewGroup implements View.OnClickListener {
}
}
public interface OnCancelListener {
void onCancel(FabLayout fabLayout);
public interface OnExpandListener {
void onExpand(boolean expanded);
}
}
@@ -121,7 +121,7 @@ public class FloatLabelEditText extends FrameLayout {
// If we do not have a valid hint, try and retrieve it from the EditText
if (TextUtils.isEmpty(mHint)) {
setHint(mEditText.getHint());
setHintInternal(mEditText.getHint());
}
// Align with label and edittext
@@ -133,6 +133,11 @@ public class FloatLabelEditText extends FrameLayout {
}
public void setHint(CharSequence hint) {
mEditText.setHint(hint);
setHintInternal(hint);
}
private void setHintInternal(CharSequence hint) {
mHint = hint;
mLabel.setText(hint);
}
@@ -106,6 +106,8 @@ public class EasyRecyclerView extends RecyclerView {
private boolean mCustomChoice = false;
private boolean mOutOfCustomChoiceModing = false;
private SparseBooleanArray mTempCheckStates;
private FixCheckedHelper mFixCheckedHelper;
@@ -520,7 +522,8 @@ public class EasyRecyclerView extends RecyclerView {
}
public void outOfCustomChoiceMode() {
if (mChoiceMode == CHOICE_MODE_MULTIPLE_CUSTOM && mCustomChoice) {
if (mChoiceMode == CHOICE_MODE_MULTIPLE_CUSTOM && mCustomChoice && !mOutOfCustomChoiceModing) {
mOutOfCustomChoiceModing = true;
// Copy mCheckStates
mTempCheckStates.clear();
@@ -536,6 +539,8 @@ public class EasyRecyclerView extends RecyclerView {
mCustomChoice = false;
mCustomChoiceListener.onOutOfCustomChoice(this);
mOutOfCustomChoiceModing = false;
}
}