This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Get alpha color | |
static int calculateStatusBarColor(int color, int alpha) { | |
float a = 1 - alpha / 255f; | |
int red = color >> 16 & 0xff; | |
int green = color >> 8 & 0xff; | |
int blue = color & 0xff; | |
red = (int) (red * a + 0.5); | |
green = (int) (green * a + 0.5); | |
blue = (int) (blue * a + 0.5); | |
return 0xff << 24 | red << 16 | green << 8 | blue; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PhoneVerifyFragment extends BaseFragment implements View.OnClickListener { | |
private static Handler mTimeHandler; | |
private PhoneVerifyHandler mVerifyHandler; | |
private String mDelayText; | |
private boolean mIsFinish; | |
private int mOpenType; | |
@Override | |
public void onBundleReceived(Bundle data) { | |
super.onBundleReceived(data); | |
mOpenType = data.getInt(Keys.EXTRA_OPEN_TYPE, VerifyController.PWD_SET_REGISTER); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final float currentX = event.getX(), currentY = event.getY(); | |
if (event.getAction() == MotionEvent.ACTION_DOWN) { | |
mLastX = currentX; | |
mLastY = currentY; | |
} else if (event.getAction() == MotionEvent.ACTION_MOVE) { | |
final float dy = Math.abs(currentY - mLastY); | |
if (dy > Math.abs(currentX - mLastX) && dy > TOUCH_SLOP) { | |
if (!mIsFabShowing && mLastY < currentY) { // 向上翻页 | |
mFabListener.onFabShow(); | |
mIsFabShowing = true; |