|
|
@@ -2,6 +2,7 @@ package com.webrain.dailypay.ui.fragment.position;
|
|
|
|
|
|
import android.graphics.Color;
|
|
|
import android.graphics.drawable.ColorDrawable;
|
|
|
+import android.graphics.drawable.Drawable;
|
|
|
import android.os.Bundle;
|
|
|
import android.support.annotation.NonNull;
|
|
|
import android.support.annotation.Nullable;
|
|
|
@@ -38,6 +39,7 @@ import com.webrain.dailypay.utils.BaseInformationUtils;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
+import butterknife.BindDrawable;
|
|
|
import butterknife.BindView;
|
|
|
import butterknife.ButterKnife;
|
|
|
import butterknife.OnClick;
|
|
|
@@ -150,7 +152,10 @@ public class PositionPartReleaseFragment extends BaseFragment<PositionPartReleas
|
|
|
RadioButton rbFemale;
|
|
|
@BindView(R.id.rb_normal)
|
|
|
RadioButton rbNormal;
|
|
|
-
|
|
|
+ @BindDrawable(R.mipmap.ic_position_release_remove)
|
|
|
+ Drawable dRemove;
|
|
|
+ @BindDrawable(R.mipmap.ic_position_release_add)
|
|
|
+ Drawable dAdd;
|
|
|
|
|
|
@Override
|
|
|
protected int getLayoutId() {
|
|
|
@@ -168,6 +173,10 @@ public class PositionPartReleaseFragment extends BaseFragment<PositionPartReleas
|
|
|
salWorkTime.initExpand(false);
|
|
|
salRecruitmentDeadline.initExpand(false);
|
|
|
salEducationalRequirement.initExpand(false);
|
|
|
+ salAgain.initExpand(false);
|
|
|
+ salMore.initExpand(false);
|
|
|
+ salAgain.setOnAnimationListener(onAgainAnimationListener);
|
|
|
+ salMore.setOnAnimationListener(onMoreAnimationListener);
|
|
|
mvpPresenter.init();
|
|
|
return view;
|
|
|
}
|
|
|
@@ -260,12 +269,37 @@ public class PositionPartReleaseFragment extends BaseFragment<PositionPartReleas
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 工作地址回调
|
|
|
+ * 动画结束回调
|
|
|
+ */
|
|
|
+ ShrinkAnimationLayout.OnAnimationListener onAgainAnimationListener = new ShrinkAnimationLayout.OnAnimationListener() {
|
|
|
+ @Override
|
|
|
+ public void onFinish(boolean isShow) {
|
|
|
+ if (isShow) {
|
|
|
+ dRemove.setBounds(0, 0, dRemove.getMinimumWidth(), dRemove.getMinimumHeight());
|
|
|
+ tvInformationAgain.setCompoundDrawables(dRemove, null, null, null);
|
|
|
+ tvInformationAgain.setText(R.string.position_click_close_all_information);
|
|
|
+ } else {
|
|
|
+ dAdd.setBounds(0, 0, dAdd.getMinimumWidth(), dAdd.getMinimumHeight());
|
|
|
+ tvInformationAgain.setCompoundDrawables(dAdd, null, null, null);
|
|
|
+ tvInformationAgain.setText(R.string.position_click_open_all_information);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+ /**
|
|
|
+ * 动画结束回调
|
|
|
*/
|
|
|
- WorkAddressHolder.OnAddressChangeListener onAddressChangeListener = new WorkAddressHolder.OnAddressChangeListener() {
|
|
|
+ ShrinkAnimationLayout.OnAnimationListener onMoreAnimationListener = new ShrinkAnimationLayout.OnAnimationListener() {
|
|
|
@Override
|
|
|
- public void onChange(String address) {
|
|
|
- tvWorkAddress.setText(address);
|
|
|
+ public void onFinish(boolean isShow) {
|
|
|
+ if (isShow) {
|
|
|
+ dRemove.setBounds(0, 0, dRemove.getMinimumWidth(), dRemove.getMinimumHeight());
|
|
|
+ tvInformationMore.setCompoundDrawables(dRemove, null, null, null);
|
|
|
+ tvInformationMore.setText(R.string.position_click_close_all_information);
|
|
|
+ } else {
|
|
|
+ dAdd.setBounds(0, 0, dAdd.getMinimumWidth(), dAdd.getMinimumHeight());
|
|
|
+ tvInformationMore.setCompoundDrawables(dAdd, null, null, null);
|
|
|
+ tvInformationMore.setText(R.string.position_click_open_all_information);
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
|