Parcourir la source

完善兼职 发布界面

ZhangXinYu il y a 6 ans
Parent
commit
79db857d27

+ 1 - 6
.idea/misc.xml

@@ -29,10 +29,5 @@
       </value>
     </option>
   </component>
-  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
-    <output url="file://$PROJECT_DIR$/build/classes" />
-  </component>
-  <component name="ProjectType">
-    <option name="id" value="Android" />
-  </component>
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
 </project>

+ 1 - 1
.idea/vcs.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="VcsDirectoryMappings">
-    <mapping directory="" vcs="Git" />
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
   </component>
 </project>

+ 50 - 1
app/src/main/java/com/webrain/dailypay/ui/fragment/position/PositionPartReleaseFragment.java

@@ -11,6 +11,10 @@ import android.view.ViewGroup;
 import android.widget.Button;
 import android.widget.EditText;
 import android.widget.GridView;
+import android.widget.LinearLayout;
+import android.widget.RadioGroup;
+import android.widget.Switch;
+import android.widget.TextView;
 import android.widget.ViewFlipper;
 
 import com.webrain.dailypay.R;
@@ -18,6 +22,7 @@ import com.webrain.dailypay.ui.adapter.gridview.PositionTypeSelectAdapter;
 import com.webrain.dailypay.ui.base.BaseFragment;
 import com.webrain.dailypay.ui.mvp.contacts.PositionPartReleaseFragmentContacts;
 import com.webrain.dailypay.ui.mvp.presenter.PositionPartReleaseFragmentPresenter;
+import com.webrain.dailypay.ui.widget.ShrinkAnimationLayout;
 import com.webrain.dailypay.utils.BaseInformationUtils;
 
 import butterknife.BindView;
@@ -41,6 +46,44 @@ public class PositionPartReleaseFragment extends BaseFragment<PositionPartReleas
     Button btnNext2;
     @BindView(R.id.vf_part)
     ViewFlipper vfPart;
+    @BindView(R.id.et_money)
+    EditText etMoney;
+    @BindView(R.id.et_rewards)
+    EditText etRewards;
+    @BindView(R.id.gv_welfare)
+    GridView gvWelfare;
+    @BindView(R.id.gv_payment)
+    GridView gvPayment;
+    @BindView(R.id.s_team)
+    Switch sTeam;
+    @BindView(R.id.tv_information_again)
+    TextView tvInformationAgain;
+    @BindView(R.id.ll_information_again_close)
+    LinearLayout llInformationAgainClose;
+    @BindView(R.id.et_deadline)
+    EditText etDeadline;
+    @BindView(R.id.et_contact)
+    EditText etContact;
+    @BindView(R.id.et_contact_number)
+    EditText etContactNumber;
+    @BindView(R.id.et_work_time)
+    EditText etWorkTime;
+    @BindView(R.id.et_work_time_frame)
+    EditText etWorkTimeFrame;
+    @BindView(R.id.et_work_address)
+    EditText etWorkAddress;
+    @BindView(R.id.et_educational_requirement)
+    EditText etEducationalRequirement;
+    @BindView(R.id.rg_gender)
+    RadioGroup rgGender;
+    @BindView(R.id.sal_more)
+    ShrinkAnimationLayout salMore;
+    @BindView(R.id.tv_information_more)
+    TextView tvInformationMore;
+    @BindView(R.id.ll_information_more_close)
+    LinearLayout llInformationMoreClose;
+    @BindView(R.id.sal_again)
+    ShrinkAnimationLayout salAgain;
 
     PositionTypeSelectAdapter mAdapter;
 
@@ -70,12 +113,18 @@ public class PositionPartReleaseFragment extends BaseFragment<PositionPartReleas
         super.onDestroyView();
     }
 
-    @OnClick(R.id.btn_next)
+    @OnClick({R.id.btn_next, R.id.ll_information_more_close, R.id.ll_information_again_close})
     public void onClick(View view) {
         switch (view.getId()) {
             case R.id.btn_next:
                 vfPart.showNext();
                 break;
+            case R.id.ll_information_again_close:
+                salAgain.toggleExpand();
+                break;
+            case R.id.ll_information_more_close:
+                salMore.toggleExpand();
+                break;
         }
     }
 

+ 125 - 0
app/src/main/java/com/webrain/dailypay/ui/widget/ShrinkAnimationLayout.java

@@ -0,0 +1,125 @@
+package com.webrain.dailypay.ui.widget;
+
+import android.animation.ValueAnimator;
+import android.content.Context;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.LinearLayout;
+
+public class ShrinkAnimationLayout extends LinearLayout {
+
+    public ShrinkAnimationLayout(Context context) {
+        this(context, null);
+    }
+
+    public ShrinkAnimationLayout(Context context, AttributeSet attrs) {
+        this(context, attrs, 0);
+    }
+
+    public ShrinkAnimationLayout(Context context, AttributeSet attrs, int defStyle) {
+        super(context, attrs, defStyle);
+        initView();
+    }
+
+    private View layoutView;
+    private int viewHeight;
+    private boolean isExpand;
+    private long animationDuration;
+
+    private void initView() {
+        layoutView = this;
+        isExpand = true;
+        animationDuration = 300;
+        setViewDimensions();
+    }
+
+    /**
+     * @param isExpand 初始状态是否折叠
+     */
+    public void initExpand(boolean isExpand) {
+        this.isExpand = isExpand;
+        if (!isExpand) {
+            animateToggle(10);
+        }
+    }
+
+    /**
+     * 设置动画时间
+     *
+     * @param animationDuration 动画时间
+     */
+    public void setAnimationDuration(long animationDuration) {
+        this.animationDuration = animationDuration;
+    }
+
+    /**
+     * 获取 subView 的总高度
+     * View.post() 的 runnable 对象中的方法会在 View 的 measure、layout 等事件后触发
+     */
+    private void setViewDimensions() {
+        layoutView.post(new Runnable() {
+            @Override
+            public void run() {
+                if (viewHeight <= 0) {
+                    viewHeight = layoutView.getMeasuredHeight();
+                }
+            }
+        });
+    }
+
+    public static void setViewHeight(View view, int height) {
+        final ViewGroup.LayoutParams params = view.getLayoutParams();
+        params.height = height;
+        view.requestLayout();
+    }
+
+    /**
+     * 切换动画实现
+     */
+    private void animateToggle(long animationDuration) {
+        ValueAnimator heightAnimation = isExpand ?
+                ValueAnimator.ofFloat(0f, viewHeight) : ValueAnimator.ofFloat(viewHeight, 0f);
+        heightAnimation.setDuration(animationDuration / 2);
+        heightAnimation.setStartDelay(animationDuration / 2);
+
+        heightAnimation.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
+            @Override
+            public void onAnimationUpdate(ValueAnimator animation) {
+                float val = (float) animation.getAnimatedValue();
+                setViewHeight(layoutView, (int) val);
+            }
+        });
+
+        heightAnimation.start();
+    }
+
+    public boolean isExpand() {
+        return isExpand;
+    }
+
+    /**
+     * 折叠view
+     */
+    public void collapse() {
+        isExpand = false;
+        animateToggle(animationDuration);
+    }
+
+    /**
+     * 展开view
+     */
+    public void expand() {
+        isExpand = true;
+        animateToggle(animationDuration);
+    }
+
+    public void toggleExpand() {
+        if (isExpand) {
+            collapse();
+        } else {
+            expand();
+        }
+    }
+
+}

+ 0 - 1
app/src/main/res/layout/activity_identity_company.xml

@@ -192,7 +192,6 @@
                                 android:layout_height="wrap_content"
                                 android:layout_marginRight="20dp"
                                 android:button="@drawable/radio_select"
-                                android:checked="true"
                                 android:paddingLeft="5dp"
                                 android:text="@string/long_time_valid"
                                 android:textColor="@color/text_black"

+ 255 - 8
app/src/main/res/layout/view_flipper_position_part_release_two.xml

@@ -352,8 +352,8 @@
                     android:layout_marginTop="164dp"
                     android:orientation="vertical">
 
-                    <LinearLayout
-                        android:id="@+id/ll_information_again"
+                    <com.webrain.dailypay.ui.widget.ShrinkAnimationLayout
+                        android:id="@+id/sal_again"
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"
                         android:orientation="vertical"
@@ -441,7 +441,7 @@
                             android:text="@string/position_team_tips"
                             android:textColor="@color/text_gray"
                             android:textSize="@dimen/px33_11sp" />
-                    </LinearLayout>
+                    </com.webrain.dailypay.ui.widget.ShrinkAnimationLayout>
 
 
                     <LinearLayout
@@ -523,7 +523,91 @@
                         <LinearLayout
                             android:layout_width="match_parent"
                             android:layout_height="31dp"
-                            android:orientation="horizontal">
+                            android:layout_marginTop="9dp"
+                            android:gravity="center_vertical"
+                            android:orientation="horizontal"
+                            android:paddingLeft="12dp"
+                            android:paddingRight="12dp">
+
+                            <TextView
+                                android:layout_width="0dp"
+                                android:layout_height="wrap_content"
+                                android:layout_weight="1"
+                                android:text="@string/position_recruitment_deadline"
+                                android:textColor="@color/text_black"
+                                android:textSize="@dimen/px33_11sp" />
+
+                            <EditText
+                                android:id="@+id/et_deadline"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:background="@null"
+                                android:gravity="right"
+                                android:hint="@string/hint_click_select_time"
+                                android:textColor="@color/main_purple"
+                                android:textColorHint="@color/text_hint_gray"
+                                android:textSize="@dimen/px33_11sp" />
+
+                        </LinearLayout>
+
+
+                        <LinearLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="31dp"
+                            android:gravity="center_vertical"
+                            android:orientation="horizontal"
+                            android:paddingLeft="12dp"
+                            android:paddingRight="12dp">
+
+                            <TextView
+                                android:layout_width="0dp"
+                                android:layout_height="wrap_content"
+                                android:layout_weight="1"
+                                android:text="@string/position_recruitment_contact"
+                                android:textColor="@color/text_black"
+                                android:textSize="@dimen/px33_11sp" />
+
+                            <EditText
+                                android:id="@+id/et_contact"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:background="@null"
+                                android:gravity="right"
+                                android:hint="@string/hint_click_input_contact_name"
+                                android:textColor="@color/main_purple"
+                                android:textColorHint="@color/text_hint_gray"
+                                android:textSize="@dimen/px33_11sp" />
+
+                        </LinearLayout>
+
+
+                        <LinearLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="31dp"
+                            android:layout_marginBottom="25dp"
+                            android:gravity="center_vertical"
+                            android:orientation="horizontal"
+                            android:paddingLeft="12dp"
+                            android:paddingRight="12dp">
+
+                            <TextView
+                                android:layout_width="0dp"
+                                android:layout_height="wrap_content"
+                                android:layout_weight="1"
+                                android:text="@string/position_recruitment_contact_number"
+                                android:textColor="@color/text_black"
+                                android:textSize="@dimen/px33_11sp" />
+
+                            <EditText
+                                android:id="@+id/et_contact_number"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:background="@null"
+                                android:gravity="right"
+                                android:hint="@string/hint_click_input_contact_phone"
+                                android:textColor="@color/main_purple"
+                                android:textColorHint="@color/text_hint_gray"
+                                android:textSize="@dimen/px33_11sp" />
 
                         </LinearLayout>
 
@@ -534,19 +618,182 @@
                 <LinearLayout
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginTop="164dp"
+                    android:layout_marginTop="158dp"
                     android:orientation="vertical">
 
-                    <LinearLayout
-                        android:id="@+id/ll_information_more"
+                    <com.webrain.dailypay.ui.widget.ShrinkAnimationLayout
+                        android:id="@+id/sal_more"
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"
                         android:orientation="vertical"
                         android:paddingLeft="29dp"
                         android:paddingRight="29dp">
 
+                        <LinearLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="31dp"
+                            android:layout_marginTop="27dp"
+                            android:gravity="center_vertical"
+                            android:orientation="horizontal">
 
-                    </LinearLayout>
+                            <TextView
+                                android:layout_width="0dp"
+                                android:layout_height="wrap_content"
+                                android:layout_weight="1"
+                                android:text="@string/position_work_time"
+                                android:textColor="@color/text_black"
+                                android:textSize="@dimen/px33_11sp" />
+
+                            <EditText
+                                android:id="@+id/et_work_time"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:background="@null"
+                                android:gravity="right"
+                                android:hint="@string/hint_click_select_part_date"
+                                android:textColor="@color/main_purple"
+                                android:textColorHint="@color/text_hint_gray"
+                                android:textSize="@dimen/px33_11sp" />
+
+                        </LinearLayout>
+
+                        <LinearLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="31dp"
+                            android:gravity="center_vertical"
+                            android:orientation="horizontal">
+
+                            <TextView
+                                android:layout_width="0dp"
+                                android:layout_height="wrap_content"
+                                android:layout_weight="1"
+                                android:text="@string/position_work_time_frame"
+                                android:textColor="@color/text_black"
+                                android:textSize="@dimen/px33_11sp" />
+
+                            <EditText
+                                android:id="@+id/et_work_time_frame"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:background="@null"
+                                android:gravity="right"
+                                android:hint="@string/hint_click_select_part_time_frame"
+                                android:textColor="@color/main_purple"
+                                android:textColorHint="@color/text_hint_gray"
+                                android:textSize="@dimen/px33_11sp" />
+
+                        </LinearLayout>
+
+                        <LinearLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="31dp"
+                            android:gravity="center_vertical"
+                            android:orientation="horizontal">
+
+                            <TextView
+                                android:layout_width="0dp"
+                                android:layout_height="wrap_content"
+                                android:layout_weight="1"
+                                android:text="@string/position_work_address"
+                                android:textColor="@color/text_black"
+                                android:textSize="@dimen/px33_11sp" />
+
+                            <EditText
+                                android:id="@+id/et_work_address"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:background="@null"
+                                android:gravity="right"
+                                android:hint="@string/hint_click_select_address"
+                                android:textColor="@color/main_purple"
+                                android:textColorHint="@color/text_hint_gray"
+                                android:textSize="@dimen/px33_11sp" />
+
+                        </LinearLayout>
+
+                        <LinearLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="31dp"
+                            android:gravity="center_vertical"
+                            android:orientation="horizontal">
+
+                            <TextView
+                                android:layout_width="0dp"
+                                android:layout_height="wrap_content"
+                                android:layout_weight="1"
+                                android:text="@string/position_educational_requirement"
+                                android:textColor="@color/text_black"
+                                android:textSize="@dimen/px33_11sp" />
+
+                            <EditText
+                                android:id="@+id/et_educational_requirement"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:background="@null"
+                                android:gravity="right"
+                                android:hint="@string/hint_click_select_educational_requirement"
+                                android:textColor="@color/main_purple"
+                                android:textColorHint="@color/text_hint_gray"
+                                android:textSize="@dimen/px33_11sp" />
+
+                        </LinearLayout>
+
+                        <LinearLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="31dp"
+                            android:layout_marginBottom="27dp"
+                            android:gravity="center_vertical"
+                            android:orientation="horizontal">
+
+                            <TextView
+                                android:layout_width="0dp"
+                                android:layout_height="wrap_content"
+                                android:layout_weight="1"
+                                android:text="@string/position_gender_requirement"
+                                android:textColor="@color/text_black"
+                                android:textSize="@dimen/px33_11sp" />
+
+                            <RadioGroup
+                                android:id="@+id/rg_gender"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:orientation="horizontal">
+
+                                <RadioButton
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="wrap_content"
+                                    android:layout_marginRight="20dp"
+                                    android:button="@drawable/radio_select"
+                                    android:paddingLeft="4dp"
+                                    android:text="@string/male"
+                                    android:textColor="@color/text_black"
+                                    android:textSize="@dimen/px33_11sp" />
+
+                                <RadioButton
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="wrap_content"
+                                    android:layout_marginRight="20dp"
+                                    android:button="@drawable/radio_select"
+                                    android:paddingLeft="4dp"
+                                    android:text="@string/female"
+                                    android:textColor="@color/text_black"
+                                    android:textSize="@dimen/px33_11sp" />
+
+                                <RadioButton
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="wrap_content"
+                                    android:button="@drawable/radio_select"
+                                    android:paddingLeft="4dp"
+                                    android:text="@string/unlimited"
+                                    android:textColor="@color/text_black"
+                                    android:textSize="@dimen/px33_11sp" />
+
+                            </RadioGroup>
+
+                        </LinearLayout>
+
+
+                    </com.webrain.dailypay.ui.widget.ShrinkAnimationLayout>
 
 
                     <LinearLayout

+ 19 - 1
app/src/main/res/values/strings.xml

@@ -10,6 +10,9 @@
     <string name="next">下一步</string>
     <string name="people">人</string>
     <string name="yuan">元</string>
+    <string name="male">男</string>
+    <string name="female">女</string>
+    <string name="unlimited">不限</string>
 
 
     <string name="please_choose_account_type">请选择您的账户类型</string>
@@ -95,7 +98,14 @@
     <string name="position_is_need_open_team_road">是否需要开启团队合作通道</string>
     <string name="position_team_tips">团队可帮助您寻找到更高效地寻找到优质目标岗位人选,也可帮您进行后续人力管理等。</string>
     <string name="position_click_close_all_information">点击收起全部岗位信息</string>
-
+    <string name="position_recruitment_deadline">招聘截止日期</string>
+    <string name="position_recruitment_contact">招聘联系人</string>
+    <string name="position_recruitment_contact_number">招聘联系电话</string>
+    <string name="position_work_time">工作时间</string>
+    <string name="position_work_time_frame">工作时段</string>
+    <string name="position_work_address">工作地点</string>
+    <string name="position_educational_requirement">学历要求</string>
+    <string name="position_gender_requirement">性别要求</string>
 
 
     <string name="hint_your_phone">您的常用手机号码</string>
@@ -110,6 +120,14 @@
     <string name="hint_input_position_part_desc">输入对该岗位的介绍,最多不超过1000个字\n\n例如:\n奶茶店门店点单员,主要工作内容为帮助客人进行下单,\n需要统一着装,以及化淡妆。有过门店工作经历者或餐饮\n业工作经验者优先。</string>
     <string name="hint_input_num">输入数字</string>
     <string name="hint_rewards_info">即是否有绩效、提成等奖励,最多不超过30个字</string>
+    <string name="hint_click_select_time">点击选择时间,默认为不限</string>
+    <string name="hint_click_input_contact_name">点击输入招聘负责人姓名</string>
+    <string name="hint_click_input_contact_phone">点击输入招聘联系方式</string>
+    <string name="hint_click_select_part_date">点击选择兼职日期,不填写则不会显示</string>
+    <string name="hint_click_select_part_time_frame">点击选择兼职工时,不填写则不会显示</string>
+    <string name="hint_click_select_address">点击选择工作地点</string>
+    <string name="hint_click_select_educational_requirement">点击选择最低学历要求,默认为不限</string>
+
 
     <string name="tab_resume">简历</string>
     <string name="tab_position">岗位</string>