Commit a145cbca133a5981f3de75e3d10ec98641ce1571
1 parent
db27de12ce
Exists in
master
整理代码
Showing
10 changed files
with
83 additions
and
43 deletions
Show diff stats
PersonalCenter/.idea/modules.xml
| 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <project version="4"> | 2 | <project version="4"> |
| 3 | <component name="ProjectModuleManager"> | 3 | <component name="ProjectModuleManager"> |
| 4 | <modules> | 4 | <modules> |
| 5 | <module fileurl="file://$PROJECT_DIR$/PersonalCenter.iml" filepath="$PROJECT_DIR$/PersonalCenter.iml" /> | 5 | <module fileurl="file://$PROJECT_DIR$/PersonalCenter.iml" filepath="$PROJECT_DIR$/PersonalCenter.iml" /> |
| 6 | <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" /> | 6 | <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" /> |
| 7 | <module fileurl="file://$PROJECT_DIR$/circledialog/circledialog.iml" filepath="$PROJECT_DIR$/circledialog/circledialog.iml" /> | 7 | <module fileurl="file://$PROJECT_DIR$/circledialog/circledialog.iml" filepath="$PROJECT_DIR$/circledialog/circledialog.iml" /> |
| 8 | <module fileurl="file://$PROJECT_DIR$/pickerview/pickerview.iml" filepath="$PROJECT_DIR$/pickerview/pickerview.iml" /> | 8 | <module fileurl="file://$PROJECT_DIR$/pickerview/pickerview.iml" filepath="$PROJECT_DIR$/pickerview/pickerview.iml" /> |
| 9 | <module fileurl="file://$PROJECT_DIR$/pickerview/pickerview.iml" filepath="$PROJECT_DIR$/pickerview/pickerview.iml" /> | ||
| 9 | </modules> | 10 | </modules> |
| 10 | </component> | 11 | </component> |
| 11 | </project> | 12 | </project> |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/ElectronicCardEditInfoActivity.java
| 1 | package com.hjx.personalcenter.activity; | 1 | package com.hjx.personalcenter.activity; |
| 2 | 2 | ||
| 3 | import android.app.Activity; | 3 | import android.app.Activity; |
| 4 | import android.graphics.Color; | 4 | import android.graphics.Color; |
| 5 | import android.os.Bundle; | 5 | import android.os.Bundle; |
| 6 | import android.view.Gravity; | ||
| 6 | import android.view.View; | 7 | import android.view.View; |
| 8 | import android.view.ViewGroup; | ||
| 7 | import android.widget.Button; | 9 | import android.widget.Button; |
| 8 | import android.widget.LinearLayout; | 10 | import android.widget.LinearLayout; |
| 9 | import android.widget.TextView; | 11 | import android.widget.TextView; |
| 10 | 12 | ||
| 11 | import com.bigkoo.pickerview.TimePickerView; | 13 | import com.bigkoo.pickerview.TimePickerView; |
| 12 | import com.hjx.personalcenter.R; | 14 | import com.hjx.personalcenter.R; |
| 13 | 15 | ||
| 14 | import java.text.SimpleDateFormat; | 16 | import java.text.SimpleDateFormat; |
| 15 | import java.util.Calendar; | 17 | import java.util.Calendar; |
| 16 | import java.util.Date; | 18 | import java.util.Date; |
| 17 | 19 | ||
| 18 | /**填写保卡信息 熊巍 | 20 | /**填写保卡信息 熊巍 |
| 19 | * Created by h on 2017/8/11. | 21 | * Created by h on 2017/8/11. |
| 20 | */ | 22 | */ |
| 21 | 23 | ||
| 22 | public class ElectronicCardEditInfoActivity extends Activity implements View.OnClickListener { | 24 | public class ElectronicCardEditInfoActivity extends Activity implements View.OnClickListener { |
| 23 | private LinearLayout lineL_buy_time; | 25 | private LinearLayout lineL_buy_time; |
| 24 | private TextView tv_buy_time; | 26 | private TextView tv_buy_time; |
| 25 | private TimePickerView pvTime; | 27 | private TimePickerView pvTime; |
| 26 | 28 | ||
| 27 | @Override | 29 | @Override |
| 28 | protected void onCreate(Bundle savedInstanceState) { | 30 | protected void onCreate(Bundle savedInstanceState) { |
| 29 | super.onCreate(savedInstanceState); | 31 | super.onCreate(savedInstanceState); |
| 30 | setContentView(R.layout.activity_electroniccard_info); | 32 | setContentView(R.layout.activity_electroniccard_info); |
| 31 | initView(); | 33 | initView(); |
| 32 | initData(); | 34 | initData(); |
| 33 | initLister(); | 35 | initLister(); |
| 34 | initTimePicker(); | 36 | initTimePicker(); |
| 35 | } | 37 | } |
| 36 | 38 | ||
| 37 | private void initView() { | 39 | private void initView() { |
| 38 | lineL_buy_time = (LinearLayout) findViewById(R.id.lineL_buy_time); | 40 | lineL_buy_time = (LinearLayout) findViewById(R.id.lineL_buy_time); |
| 39 | tv_buy_time = (TextView) findViewById(R.id.tv_buy_time); | 41 | tv_buy_time = (TextView) findViewById(R.id.tv_buy_time); |
| 40 | } | 42 | } |
| 41 | 43 | ||
| 42 | private void initData() { | 44 | private void initData() { |
| 43 | 45 | ||
| 44 | } | 46 | } |
| 45 | 47 | ||
| 46 | private void initLister() { | 48 | private void initLister() { |
| 47 | lineL_buy_time.setOnClickListener(this); | 49 | lineL_buy_time.setOnClickListener(this); |
| 48 | 50 | ||
| 49 | } | 51 | } |
| 50 | private void initTimePicker() { | 52 | private void initTimePicker() { |
| 51 | //控制时间范围(如果不设置范围,则使用默认时间1900-2100年,此段代码可注释) | 53 | //控制时间范围(如果不设置范围,则使用默认时间1900-2100年,此段代码可注释) |
| 52 | //因为系统Calendar的月份是从0-11的,所以如果是调用Calendar的set方法来设置时间,月份的范围也要是从0-11 | 54 | //因为系统Calendar的月份是从0-11的,所以如果是调用Calendar的set方法来设置时间,月份的范围也要是从0-11 |
| 53 | Calendar selectedDate = Calendar.getInstance(); | 55 | Calendar selectedDate = Calendar.getInstance(); |
| 54 | Calendar startDate = Calendar.getInstance(); | 56 | Calendar startDate = Calendar.getInstance(); |
| 55 | startDate.set(2013, 0, 23); | 57 | startDate.set(1900, 1, 1); |
| 56 | Calendar endDate = Calendar.getInstance(); | 58 | Calendar endDate = Calendar.getInstance(); |
| 57 | endDate.set(2019, 11, 28); | 59 | endDate.set(2100, 1, 1); |
| 58 | //时间选择器 | 60 | //时间选择器 |
| 59 | pvTime = new TimePickerView.Builder(this, new TimePickerView.OnTimeSelectListener() { | 61 | pvTime = new TimePickerView.Builder(this, new TimePickerView.OnTimeSelectListener() { |
| 60 | @Override | 62 | @Override |
| 61 | public void onTimeSelect(Date date, View v) {//选中事件回调 | 63 | public void onTimeSelect(Date date, View v) {//选中事件回调 |
| 62 | // 这里回调过来的v,就是show()方法里面所添加的 View 参数,如果show的时候没有添加参数,v则为null | 64 | // 这里回调过来的v,就是show()方法里面所添加的 View 参数,如果show的时候没有添加参数,v则为null |
| 63 | /*btn_Time.setText(getTime(date));*/ | 65 | /*btn_Time.setText(getTime(date));*/ |
| 64 | Button btn = (Button) v; | 66 | TextView btn = (TextView) v; |
| 65 | btn.setText(getTime(date)); | 67 | btn.setText(getTime(date)); |
| 66 | } | 68 | } |
| 67 | }) | 69 | }) |
| 68 | //年月日时分秒 的显示与否,不设置则默认全部显示 | 70 | //年月日时分秒 的显示与否,不设置则默认全部显示 |
| 69 | .setType(new boolean[]{true, true, true, false, false, false}) | 71 | .setType(new boolean[]{true, true, true, false, false, false}) |
| 70 | .setLabel("", "", "", "", "", "") | 72 | .setLabel("", "", "", "", "", "") |
| 71 | .isCenterLabel(false) | 73 | .isCenterLabel(false) |
| 72 | .setDividerColor(Color.DKGRAY) | 74 | .setDividerColor(Color.DKGRAY) |
| 73 | .setContentSize(21) | 75 | .setContentSize(21) |
| 74 | .setDate(selectedDate) | 76 | .setDate(selectedDate) |
| 75 | .setRangDate(startDate, endDate) | 77 | .setRangDate(startDate, endDate) |
| 76 | .setBackgroundId(0x00FFFFFF) //设置外部遮罩颜色 | 78 | .setBackgroundId(0x80000000) //设置外部遮罩颜色 |
| 77 | .setDecorView(null) | 79 | .setDecorView(null) |
| 78 | .build(); | 80 | .build(); |
| 79 | } | 81 | } |
| 80 | private String getTime(Date date) {//可根据需要自行截取数据显示 | 82 | private String getTime(Date date) {//可根据需要自行截取数据显示 |
| 81 | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | 83 | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
| 82 | return format.format(date); | 84 | return format.format(date); |
| 83 | } | 85 | } |
| 84 | 86 | ||
| 85 | @Override | 87 | @Override |
| 86 | public void onClick(View v) { | 88 | public void onClick(View v) { |
| 87 | switch (v.getId()){ | 89 | switch (v.getId()){ |
| 88 | case R.id.lineL_buy_time: | 90 | case R.id.lineL_buy_time: |
| 89 | pvTime.show(v);//弹出时间选择器,传递参数过去,回调的时候则可以绑定此view | 91 | pvTime.show(tv_buy_time);//弹出时间选择器,传递参数过去,回调的时候则可以绑定此view |
| 90 | break; | 92 | break; |
| 91 | } | 93 | } |
| 92 | 94 | ||
| 93 | 95 | ||
| 94 | } | 96 | } |
| 95 | } | 97 | } |
| 96 | 98 |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/activity/MainActivity.java
| 1 | package com.hjx.personalcenter.activity; | 1 | package com.hjx.personalcenter.activity; |
| 2 | 2 | ||
| 3 | import android.content.Intent; | 3 | import android.content.Intent; |
| 4 | import android.support.v7.app.AppCompatActivity; | 4 | import android.support.v7.app.AppCompatActivity; |
| 5 | import android.os.Bundle; | 5 | import android.os.Bundle; |
| 6 | import android.view.View; | 6 | import android.view.View; |
| 7 | import android.widget.TextView; | 7 | import android.widget.TextView; |
| 8 | 8 | ||
| 9 | import com.hjx.personalcenter.R; | 9 | import com.hjx.personalcenter.R; |
| 10 | 10 | ||
| 11 | public class MainActivity extends AppCompatActivity { | 11 | public class MainActivity extends AppCompatActivity { |
| 12 | TextView ssss; | 12 | TextView ssss; |
| 13 | @Override | 13 | @Override |
| 14 | protected void onCreate(Bundle savedInstanceState) { | 14 | protected void onCreate(Bundle savedInstanceState) { |
| 15 | super.onCreate(savedInstanceState); | 15 | super.onCreate(savedInstanceState); |
| 16 | setContentView(R.layout.activity_main); | 16 | setContentView(R.layout.activity_main); |
| 17 | ssss = (TextView) findViewById(R.id.ssss); | 17 | ssss = (TextView) findViewById(R.id.ssss); |
| 18 | ssss.setOnClickListener(new View.OnClickListener() { | 18 | ssss.setOnClickListener(new View.OnClickListener() { |
| 19 | @Override | 19 | @Override |
| 20 | public void onClick(View v) { | 20 | public void onClick(View v) { |
| 21 | Intent intent = new Intent(MainActivity.this,RegisterInfoActivity.class); | 21 | Intent intent = new Intent(MainActivity.this,ElectronicCardEditInfoActivity.class); |
| 22 | startActivity(intent); | 22 | startActivity(intent); |
| 23 | } | 23 | } |
| 24 | }); | 24 | }); |
| 25 | } | 25 | } |
| 26 | } | 26 | } |
| 27 | 27 |
PersonalCenter/app/src/main/res/layout/activity_electronic_look_cardinfo.xml
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | 2 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | android:layout_width="match_parent" | 3 | android:layout_width="match_parent" |
| 4 | android:layout_height="match_parent" | 4 | android:layout_height="match_parent" |
| 5 | android:orientation="vertical"> | 5 | android:orientation="vertical"> |
| 6 | 6 | ||
| 7 | <RelativeLayout | 7 | <RelativeLayout |
| 8 | android:id="@+id/title" | 8 | android:id="@+id/title" |
| 9 | android:layout_width="match_parent" | 9 | android:layout_width="match_parent" |
| 10 | android:layout_height="wrap_content" | 10 | android:layout_height="wrap_content" |
| 11 | android:background="@color/login_text_blue" | 11 | android:background="@color/login_text_blue" |
| 12 | android:minHeight="50dp"> | 12 | android:minHeight="50dp"> |
| 13 | 13 | ||
| 14 | <ImageView | 14 | <ImageView |
| 15 | android:id="@+id/cancel" | 15 | android:id="@+id/cancel" |
| 16 | android:layout_width="wrap_content" | 16 | android:layout_width="wrap_content" |
| 17 | android:layout_height="wrap_content" | 17 | android:layout_height="wrap_content" |
| 18 | android:layout_centerVertical="true" | 18 | android:layout_centerVertical="true" |
| 19 | android:paddingLeft="20dp" | 19 | android:paddingLeft="20dp" |
| 20 | android:paddingRight="20dp" | 20 | android:paddingRight="20dp" |
| 21 | android:src="@mipmap/title_back" /> | 21 | android:src="@mipmap/title_back" /> |
| 22 | 22 | ||
| 23 | <TextView | 23 | <TextView |
| 24 | android:id="@+id/menu_title" | 24 | android:id="@+id/menu_title" |
| 25 | android:layout_width="wrap_content" | 25 | android:layout_width="wrap_content" |
| 26 | android:layout_height="wrap_content" | 26 | android:layout_height="wrap_content" |
| 27 | android:layout_centerInParent="true" | 27 | android:layout_centerInParent="true" |
| 28 | android:text="@string/string_electroniccard_info_look" | 28 | android:text="@string/string_electroniccard_info_look" |
| 29 | android:textColor="@android:color/white" | 29 | android:textColor="@android:color/white" |
| 30 | android:textSize="22sp" /> | 30 | android:textSize="22sp" /> |
| 31 | </RelativeLayout> | 31 | </RelativeLayout> |
| 32 | 32 | ||
| 33 | <LinearLayout | 33 | <LinearLayout |
| 34 | android:layout_width="match_parent" | 34 | android:layout_width="match_parent" |
| 35 | android:layout_height="wrap_content" | 35 | android:layout_height="wrap_content" |
| 36 | android:layout_margin="20dp" | 36 | android:layout_margin="20dp" |
| 37 | android:background="@mipmap/cardbackgrangd" | 37 | android:background="@mipmap/cardbackgrangd" |
| 38 | android:gravity="center" | 38 | android:gravity="center" |
| 39 | android:orientation="vertical"> | 39 | android:orientation="vertical"> |
| 40 | 40 | ||
| 41 | <LinearLayout | 41 | <LinearLayout |
| 42 | android:layout_width="match_parent" | 42 | android:layout_width="match_parent" |
| 43 | android:layout_height="wrap_content" | 43 | android:layout_height="wrap_content" |
| 44 | android:layout_marginTop="70dp" | 44 | android:layout_marginTop="70dp" |
| 45 | android:gravity="center_vertical" | 45 | android:gravity="center_vertical" |
| 46 | android:orientation="horizontal"> | 46 | android:orientation="horizontal"> |
| 47 | 47 | ||
| 48 | <LinearLayout | 48 | <LinearLayout |
| 49 | android:layout_width="wrap_content" | 49 | android:layout_width="wrap_content" |
| 50 | android:layout_height="wrap_content" | 50 | android:layout_height="wrap_content" |
| 51 | android:layout_marginLeft="200dp" | 51 | android:layout_marginLeft="200dp" |
| 52 | android:gravity="center_vertical"> | 52 | android:gravity="center_vertical"> |
| 53 | 53 | ||
| 54 | <ImageView | 54 | <ImageView |
| 55 | android:layout_width="wrap_content" | 55 | android:layout_width="wrap_content" |
| 56 | android:layout_height="wrap_content" | 56 | android:layout_height="wrap_content" |
| 57 | android:src="@mipmap/logo_info" /> | 57 | android:src="@mipmap/logo_info" /> |
| 58 | 58 | ||
| 59 | <TextView | 59 | <TextView |
| 60 | android:layout_width="wrap_content" | 60 | android:layout_width="wrap_content" |
| 61 | android:layout_height="wrap_content" | 61 | android:layout_height="wrap_content" |
| 62 | android:layout_marginLeft="50dp" | 62 | android:layout_marginLeft="50dp" |
| 63 | android:background="@null" | 63 | android:background="@null" |
| 64 | android:text="电子保卡" | 64 | android:text="电子保卡" |
| 65 | android:textColor="@color/electronic_card" | 65 | android:textColor="@color/electronic_card" |
| 66 | android:textSize="22sp" /> | 66 | android:textSize="22sp" /> |
| 67 | 67 | ||
| 68 | </LinearLayout> | 68 | </LinearLayout> |
| 69 | 69 | ||
| 70 | <LinearLayout | 70 | <LinearLayout |
| 71 | android:layout_width="wrap_content" | 71 | android:layout_width="wrap_content" |
| 72 | android:layout_height="80dp" | 72 | android:layout_height="80dp" |
| 73 | android:layout_marginLeft="200dp" | 73 | android:layout_marginLeft="200dp" |
| 74 | android:gravity="center_vertical"> | 74 | android:gravity="center_vertical"> |
| 75 | 75 | ||
| 76 | <TextView | 76 | <TextView |
| 77 | android:layout_width="wrap_content" | 77 | android:layout_width="wrap_content" |
| 78 | android:layout_height="wrap_content" | 78 | android:layout_height="wrap_content" |
| 79 | android:text="客户姓名" | 79 | android:text="客户姓名" |
| 80 | android:textColor="@color/btn_text_color" | 80 | android:textColor="@color/btn_text_color" |
| 81 | android:textSize="22sp" /> | 81 | android:textSize="22sp" /> |
| 82 | 82 | ||
| 83 | <TextView | 83 | <TextView |
| 84 | android:layout_width="wrap_content" | 84 | android:layout_width="wrap_content" |
| 85 | android:layout_height="wrap_content" | 85 | android:layout_height="wrap_content" |
| 86 | android:layout_marginLeft="60dp" | 86 | android:layout_marginLeft="60dp" |
| 87 | android:text="王小明" | 87 | android:text="王小明" |
| 88 | android:textColor="@color/btn_text_color" | 88 | android:textColor="@color/btn_text_color" |
| 89 | android:textSize="22sp" /> | 89 | android:textSize="22sp" /> |
| 90 | 90 | ||
| 91 | </LinearLayout> | 91 | </LinearLayout> |
| 92 | 92 | ||
| 93 | </LinearLayout> | 93 | </LinearLayout> |
| 94 | 94 | ||
| 95 | <LinearLayout | 95 | <LinearLayout |
| 96 | android:layout_width="match_parent" | 96 | android:layout_width="match_parent" |
| 97 | android:layout_height="wrap_content" | 97 | android:layout_height="wrap_content" |
| 98 | android:gravity="center_vertical" | 98 | android:gravity="center_vertical" |
| 99 | android:orientation="horizontal"> | 99 | android:orientation="horizontal"> |
| 100 | 100 | ||
| 101 | <LinearLayout | 101 | <LinearLayout |
| 102 | android:layout_width="wrap_content" | 102 | android:layout_width="wrap_content" |
| 103 | android:layout_height="60dp" | 103 | android:layout_height="60dp" |
| 104 | android:layout_marginLeft="200dp" | 104 | android:layout_marginLeft="200dp" |
| 105 | android:gravity="center_vertical"> | 105 | android:gravity="center_vertical"> |
| 106 | 106 | ||
| 107 | <TextView | 107 | <TextView |
| 108 | android:layout_width="wrap_content" | 108 | android:layout_width="wrap_content" |
| 109 | android:layout_height="wrap_content" | 109 | android:layout_height="wrap_content" |
| 110 | android:text="产品型号" | 110 | android:text="产品型号" |
| 111 | android:textColor="@color/btn_text_color" | 111 | android:textColor="@color/btn_text_color" |
| 112 | android:textSize="22sp" /> | 112 | android:textSize="22sp" /> |
| 113 | 113 | ||
| 114 | <TextView | 114 | <TextView |
| 115 | android:layout_width="wrap_content" | 115 | android:layout_width="wrap_content" |
| 116 | android:layout_height="wrap_content" | 116 | android:layout_height="wrap_content" |
| 117 | android:layout_marginLeft="50dp" | 117 | android:layout_marginLeft="50dp" |
| 118 | android:text="IPone888" | 118 | android:text="IPone888" |
| 119 | android:textSize="22sp" /> | 119 | android:textSize="22sp" /> |
| 120 | 120 | ||
| 121 | 121 | ||
| 122 | </LinearLayout> | 122 | </LinearLayout> |
| 123 | 123 | ||
| 124 | <LinearLayout | 124 | <LinearLayout |
| 125 | android:layout_width="wrap_content" | 125 | android:layout_width="wrap_content" |
| 126 | android:layout_height="60dp" | 126 | android:layout_height="60dp" |
| 127 | android:layout_marginLeft="250dp" | 127 | android:layout_marginLeft="250dp" |
| 128 | android:gravity="center_vertical"> | 128 | android:gravity="center_vertical"> |
| 129 | 129 | ||
| 130 | <TextView | 130 | <TextView |
| 131 | android:layout_width="wrap_content" | 131 | android:layout_width="wrap_content" |
| 132 | android:layout_height="wrap_content" | 132 | android:layout_height="wrap_content" |
| 133 | android:text="客户地址" | 133 | android:text="客户地址" |
| 134 | android:textSize="22sp" /> | 134 | android:textSize="22sp" /> |
| 135 | 135 | ||
| 136 | <TextView | 136 | <TextView |
| 137 | android:layout_width="wrap_content" | 137 | android:layout_width="wrap_content" |
| 138 | android:layout_height="wrap_content" | 138 | android:layout_height="wrap_content" |
| 139 | android:layout_marginLeft="98dp" | 139 | android:layout_marginLeft="98dp" |
| 140 | android:background="@null" | 140 | android:background="@null" |
| 141 | android:text="北京市昭阳区三里屯" | 141 | android:text="北京市昭阳区三里屯" |
| 142 | android:textSize="22sp" /> | 142 | android:textSize="22sp" /> |
| 143 | <TextView | 143 | <TextView |
| 144 | android:layout_width="wrap_content" | 144 | android:layout_width="wrap_content" |
| 145 | android:layout_height="wrap_content" | 145 | android:layout_height="wrap_content" |
| 146 | android:layout_marginLeft="18dp" | 146 | android:layout_marginLeft="18dp" |
| 147 | android:background="@drawable/corcle_blue_bg" | 147 | android:background="@drawable/corcle_black_bg" |
| 148 | android:text="修改" | 148 | android:text="修改" |
| 149 | android:paddingLeft="5dp" | 149 | android:paddingLeft="5dp" |
| 150 | android:paddingRight="5dp" | 150 | android:paddingRight="5dp" |
| 151 | android:textColor="@color/login_text_blue" | 151 | android:textColor="@color/login_text_blue" |
| 152 | android:textSize="18sp" /> | 152 | android:textSize="18sp" /> |
| 153 | 153 | ||
| 154 | 154 | ||
| 155 | </LinearLayout> | 155 | </LinearLayout> |
| 156 | 156 | ||
| 157 | </LinearLayout> | 157 | </LinearLayout> |
| 158 | 158 | ||
| 159 | <LinearLayout | 159 | <LinearLayout |
| 160 | android:layout_width="match_parent" | 160 | android:layout_width="match_parent" |
| 161 | android:layout_height="wrap_content" | 161 | android:layout_height="wrap_content" |
| 162 | android:gravity="center_vertical" | 162 | android:gravity="center_vertical" |
| 163 | android:orientation="horizontal"> | 163 | android:orientation="horizontal"> |
| 164 | 164 | ||
| 165 | <LinearLayout | 165 | <LinearLayout |
| 166 | android:layout_width="wrap_content" | 166 | android:layout_width="wrap_content" |
| 167 | android:layout_height="60dp" | 167 | android:layout_height="60dp" |
| 168 | android:layout_marginLeft="200dp" | 168 | android:layout_marginLeft="200dp" |
| 169 | android:gravity="center_vertical"> | 169 | android:gravity="center_vertical"> |
| 170 | 170 | ||
| 171 | <TextView | 171 | <TextView |
| 172 | android:layout_width="wrap_content" | 172 | android:layout_width="wrap_content" |
| 173 | android:layout_height="wrap_content" | 173 | android:layout_height="wrap_content" |
| 174 | android:text="MAC地址" | 174 | android:text="MAC地址" |
| 175 | android:textSize="22sp" /> | 175 | android:textSize="22sp" /> |
| 176 | 176 | ||
| 177 | <TextView | 177 | <TextView |
| 178 | android:layout_width="wrap_content" | 178 | android:layout_width="wrap_content" |
| 179 | android:layout_height="wrap_content" | 179 | android:layout_height="wrap_content" |
| 180 | android:layout_marginLeft="50dp" | 180 | android:layout_marginLeft="50dp" |
| 181 | android:background="@null" | 181 | android:background="@null" |
| 182 | android:text="237462873463278" | 182 | android:text="237462873463278" |
| 183 | android:textSize="22sp" /> | 183 | android:textSize="22sp" /> |
| 184 | 184 | ||
| 185 | </LinearLayout> | 185 | </LinearLayout> |
| 186 | 186 | ||
| 187 | <LinearLayout | 187 | <LinearLayout |
| 188 | android:layout_width="wrap_content" | 188 | android:layout_width="wrap_content" |
| 189 | android:layout_height="60dp" | 189 | android:layout_height="60dp" |
| 190 | android:layout_marginLeft="210dp" | 190 | android:layout_marginLeft="210dp" |
| 191 | android:gravity="center_vertical"> | 191 | android:gravity="center_vertical"> |
| 192 | 192 | ||
| 193 | <TextView | 193 | <TextView |
| 194 | android:layout_width="wrap_content" | 194 | android:layout_width="wrap_content" |
| 195 | android:layout_height="wrap_content" | 195 | android:layout_height="wrap_content" |
| 196 | android:text="购买时间" | 196 | android:text="购买时间" |
| 197 | android:textColor="@color/btn_text_color" | 197 | android:textColor="@color/btn_text_color" |
| 198 | android:textSize="22sp" /> | 198 | android:textSize="22sp" /> |
| 199 | 199 | ||
| 200 | <TextView | 200 | <TextView |
| 201 | android:layout_width="wrap_content" | 201 | android:layout_width="wrap_content" |
| 202 | android:layout_height="wrap_content" | 202 | android:layout_height="wrap_content" |
| 203 | android:layout_marginLeft="25dp" | 203 | android:layout_marginLeft="25dp" |
| 204 | android:background="@null" | 204 | android:background="@null" |
| 205 | android:text="4433322-334--34" | 205 | android:text="4433322-334--34" |
| 206 | android:textColor="@color/btn_text_color" | 206 | android:textColor="@color/btn_text_color" |
| 207 | android:textSize="22sp" /> | 207 | android:textSize="22sp" /> |
| 208 | </LinearLayout> | 208 | </LinearLayout> |
| 209 | 209 | ||
| 210 | </LinearLayout> | 210 | </LinearLayout> |
| 211 | 211 | ||
| 212 | <LinearLayout | 212 | <LinearLayout |
| 213 | android:layout_width="match_parent" | 213 | android:layout_width="match_parent" |
| 214 | android:layout_height="wrap_content" | 214 | android:layout_height="wrap_content" |
| 215 | android:gravity="center_vertical" | 215 | android:gravity="center_vertical" |
| 216 | android:orientation="horizontal"> | 216 | android:orientation="horizontal"> |
| 217 | 217 | ||
| 218 | <LinearLayout | 218 | <LinearLayout |
| 219 | android:layout_width="wrap_content" | 219 | android:layout_width="wrap_content" |
| 220 | android:layout_height="60dp" | 220 | android:layout_height="60dp" |
| 221 | android:layout_marginLeft="200dp" | 221 | android:layout_marginLeft="200dp" |
| 222 | android:gravity="center_vertical"> | 222 | android:gravity="center_vertical"> |
| 223 | 223 | ||
| 224 | <TextView | 224 | <TextView |
| 225 | android:layout_width="wrap_content" | 225 | android:layout_width="wrap_content" |
| 226 | android:layout_height="wrap_content" | 226 | android:layout_height="wrap_content" |
| 227 | android:text="机身编码" | 227 | android:text="机身编码" |
| 228 | android:textColor="@color/btn_text_color" | 228 | android:textColor="@color/btn_text_color" |
| 229 | android:textSize="22sp" /> | 229 | android:textSize="22sp" /> |
| 230 | 230 | ||
| 231 | <TextView | 231 | <TextView |
| 232 | android:layout_width="wrap_content" | 232 | android:layout_width="wrap_content" |
| 233 | android:layout_height="wrap_content" | 233 | android:layout_height="wrap_content" |
| 234 | android:layout_marginLeft="50dp" | 234 | android:layout_marginLeft="50dp" |
| 235 | android:hint="473463746343" | 235 | android:hint="473463746343" |
| 236 | android:textSize="22sp" /> | 236 | android:textSize="22sp" /> |
| 237 | 237 | ||
| 238 | </LinearLayout> | 238 | </LinearLayout> |
| 239 | 239 | ||
| 240 | <LinearLayout | 240 | <LinearLayout |
| 241 | android:layout_width="wrap_content" | 241 | android:layout_width="wrap_content" |
| 242 | android:layout_height="60dp" | 242 | android:layout_height="60dp" |
| 243 | android:layout_marginLeft="210dp" | 243 | android:layout_marginLeft="210dp" |
| 244 | android:gravity="center_vertical"> | 244 | android:gravity="center_vertical"> |
| 245 | 245 | ||
| 246 | <TextView | 246 | <TextView |
| 247 | android:layout_width="wrap_content" | 247 | android:layout_width="wrap_content" |
| 248 | android:layout_height="wrap_content" | 248 | android:layout_height="wrap_content" |
| 249 | android:text="购买地址" | 249 | android:text="购买地址" |
| 250 | android:textColor="@color/btn_text_color" | 250 | android:textColor="@color/btn_text_color" |
| 251 | android:textSize="22sp" /> | 251 | android:textSize="22sp" /> |
| 252 | 252 | ||
| 253 | <TextView | 253 | <TextView |
| 254 | android:layout_width="wrap_content" | 254 | android:layout_width="wrap_content" |
| 255 | android:layout_height="wrap_content" | 255 | android:layout_height="wrap_content" |
| 256 | android:layout_marginLeft="25dp" | 256 | android:layout_marginLeft="25dp" |
| 257 | android:text="啥啥啥 专卖店" | 257 | android:text="啥啥啥 专卖店" |
| 258 | android:textColor="@color/btn_text_color" | 258 | android:textColor="@color/btn_text_color" |
| 259 | android:textSize="22sp" /> | 259 | android:textSize="22sp" /> |
| 260 | </LinearLayout> | 260 | </LinearLayout> |
| 261 | 261 | ||
| 262 | </LinearLayout> | 262 | </LinearLayout> |
| 263 | 263 | ||
| 264 | <LinearLayout | 264 | <LinearLayout |
| 265 | android:layout_width="match_parent" | 265 | android:layout_width="match_parent" |
| 266 | android:layout_height="wrap_content" | 266 | android:layout_height="wrap_content" |
| 267 | android:gravity="center_vertical" | 267 | android:gravity="center_vertical" |
| 268 | android:orientation="horizontal"> | 268 | android:orientation="horizontal"> |
| 269 | 269 | ||
| 270 | <LinearLayout | 270 | <LinearLayout |
| 271 | android:layout_width="wrap_content" | 271 | android:layout_width="wrap_content" |
| 272 | android:layout_height="60dp" | 272 | android:layout_height="60dp" |
| 273 | android:layout_marginLeft="200dp" | 273 | android:layout_marginLeft="200dp" |
| 274 | android:gravity="center_vertical"> | 274 | android:gravity="center_vertical"> |
| 275 | 275 | ||
| 276 | <TextView | 276 | <TextView |
| 277 | android:layout_width="wrap_content" | 277 | android:layout_width="wrap_content" |
| 278 | android:layout_height="wrap_content" | 278 | android:layout_height="wrap_content" |
| 279 | android:text="手机号码" | 279 | android:text="手机号码" |
| 280 | android:textColor="@color/btn_text_color" | 280 | android:textColor="@color/btn_text_color" |
| 281 | android:textSize="22sp" /> | 281 | android:textSize="22sp" /> |
| 282 | 282 | ||
| 283 | <TextView | 283 | <TextView |
| 284 | android:layout_width="wrap_content" | 284 | android:layout_width="wrap_content" |
| 285 | android:layout_height="wrap_content" | 285 | android:layout_height="wrap_content" |
| 286 | android:layout_marginLeft="50dp" | 286 | android:layout_marginLeft="50dp" |
| 287 | android:text="IPone888" | 287 | android:text="IPone888" |
| 288 | android:textSize="22sp" /> | 288 | android:textSize="22sp" /> |
| 289 | <TextView | 289 | <TextView |
| 290 | android:layout_width="wrap_content" | 290 | android:layout_width="wrap_content" |
| 291 | android:layout_height="wrap_content" | 291 | android:layout_height="wrap_content" |
| 292 | android:layout_marginLeft="18dp" | 292 | android:layout_marginLeft="18dp" |
| 293 | android:background="@drawable/corcle_blue_bg" | 293 | android:background="@drawable/corcle_black_bg" |
| 294 | android:text="修改" | 294 | android:text="修改" |
| 295 | android:paddingLeft="5dp" | 295 | android:paddingLeft="5dp" |
| 296 | android:paddingRight="5dp" | 296 | android:paddingRight="5dp" |
| 297 | android:textColor="@color/login_text_blue" | 297 | android:textColor="@color/login_text_blue" |
| 298 | android:textSize="18sp" /> | 298 | android:textSize="18sp" /> |
| 299 | 299 | ||
| 300 | 300 | ||
| 301 | </LinearLayout> | 301 | </LinearLayout> |
| 302 | 302 | ||
| 303 | <LinearLayout | 303 | <LinearLayout |
| 304 | android:layout_width="wrap_content" | 304 | android:layout_width="wrap_content" |
| 305 | android:layout_height="60dp" | 305 | android:layout_height="60dp" |
| 306 | android:layout_marginLeft="250dp" | 306 | android:layout_marginLeft="250dp" |
| 307 | android:gravity="center_vertical"> | 307 | android:gravity="center_vertical"> |
| 308 | 308 | ||
| 309 | <TextView | 309 | <TextView |
| 310 | android:layout_width="wrap_content" | 310 | android:layout_width="wrap_content" |
| 311 | android:layout_height="wrap_content" | 311 | android:layout_height="wrap_content" |
| 312 | android:text="本地售后电话" | 312 | android:text="本地售后电话" |
| 313 | android:textSize="22sp" /> | 313 | android:textSize="22sp" /> |
| 314 | 314 | ||
| 315 | <TextView | 315 | <TextView |
| 316 | android:layout_width="wrap_content" | 316 | android:layout_width="wrap_content" |
| 317 | android:layout_height="wrap_content" | 317 | android:layout_height="wrap_content" |
| 318 | android:layout_marginLeft="98dp" | 318 | android:layout_marginLeft="98dp" |
| 319 | android:background="@null" | 319 | android:background="@null" |
| 320 | android:text="1111111" | 320 | android:text="1111111" |
| 321 | android:textSize="22sp" /> | 321 | android:textSize="22sp" /> |
| 322 | 322 | ||
| 323 | </LinearLayout> | 323 | </LinearLayout> |
| 324 | 324 | ||
| 325 | </LinearLayout> | 325 | </LinearLayout> |
| 326 | </LinearLayout> | 326 | </LinearLayout> |
| 327 | 327 | ||
| 328 | <LinearLayout | 328 | <LinearLayout |
| 329 | android:layout_width="match_parent" | 329 | android:layout_width="match_parent" |
| 330 | android:layout_height="wrap_content" | 330 | android:layout_height="wrap_content" |
| 331 | android:layout_marginTop="5dp" | 331 | android:layout_marginTop="5dp" |
| 332 | android:gravity="center" | 332 | android:gravity="center" |
| 333 | android:orientation="vertical"> | 333 | android:orientation="vertical"> |
| 334 | 334 | ||
| 335 | <TextView | 335 | <TextView |
| 336 | android:layout_width="wrap_content" | 336 | android:layout_width="wrap_content" |
| 337 | android:layout_height="wrap_content" | 337 | android:layout_height="wrap_content" |
| 338 | android:layout_marginTop="5dp" | 338 | android:layout_marginTop="5dp" |
| 339 | android:text="@string/electronic_card" | 339 | android:text="@string/electronic_card" |
| 340 | android:textColor="@color/electronic_text" | 340 | android:textColor="@color/electronic_text" |
| 341 | android:textSize="18sp" /> | 341 | android:textSize="18sp" /> |
| 342 | 342 | ||
| 343 | 343 | ||
| 344 | 344 | ||
| 345 | </LinearLayout> | 345 | </LinearLayout> |
| 346 | <LinearLayout | 346 | <LinearLayout |
| 347 | android:layout_width="match_parent" | 347 | android:layout_width="match_parent" |
| 348 | android:layout_height="wrap_content" | 348 | android:layout_height="wrap_content" |
| 349 | android:layout_marginTop="30dp" | 349 | android:layout_marginTop="30dp" |
| 350 | android:gravity="center" | 350 | android:gravity="center" |
| 351 | android:orientation="horizontal"> | 351 | android:orientation="horizontal"> |
| 352 | 352 | ||
| 353 | <ImageView | 353 | <ImageView |
| 354 | android:layout_width="wrap_content" | 354 | android:layout_width="wrap_content" |
| 355 | android:layout_height="wrap_content" | 355 | android:layout_height="wrap_content" |
| 356 | android:src="@mipmap/phone"/> | 356 | android:src="@mipmap/phone"/> |
| 357 | <TextView | 357 | <TextView |
| 358 | android:layout_width="wrap_content" | 358 | android:layout_width="wrap_content" |
| 359 | android:layout_height="wrap_content" | 359 | android:layout_height="wrap_content" |
| 360 | android:textSize="30sp" | 360 | android:textSize="30sp" |
| 361 | android:layout_marginLeft="5dp" | 361 | android:layout_marginLeft="5dp" |
| 362 | android:textColor="@color/login_text_blue" | 362 | android:textColor="@color/login_text_blue" |
| 363 | android:text="400-400-000"/> | 363 | android:text="400-400-000"/> |
| 364 | 364 | ||
| 365 | 365 | ||
| 366 | </LinearLayout> | 366 | </LinearLayout> |
| 367 | 367 | ||
| 368 | 368 | ||
| 369 | 369 | ||
| 370 | </LinearLayout> | 370 | </LinearLayout> |
PersonalCenter/app/src/main/res/layout/activity_electroniccard_info.xml
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | 2 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | android:id="@+id/card_view" | ||
| 3 | android:layout_width="match_parent" | 4 | android:layout_width="match_parent" |
| 4 | android:layout_height="match_parent" | 5 | android:layout_height="match_parent" |
| 5 | android:orientation="vertical"> | 6 | android:orientation="vertical"> |
| 6 | 7 | ||
| 7 | <RelativeLayout | 8 | <RelativeLayout |
| 8 | android:id="@+id/title" | 9 | android:id="@+id/title" |
| 9 | android:layout_width="match_parent" | 10 | android:layout_width="match_parent" |
| 10 | android:layout_height="wrap_content" | 11 | android:layout_height="wrap_content" |
| 11 | android:background="@color/login_text_blue" | 12 | android:background="@color/login_text_blue" |
| 12 | android:minHeight="50dp"> | 13 | android:minHeight="50dp"> |
| 13 | 14 | ||
| 14 | <ImageView | 15 | <ImageView |
| 15 | android:id="@+id/cancel" | 16 | android:id="@+id/cancel" |
| 16 | android:layout_width="wrap_content" | 17 | android:layout_width="wrap_content" |
| 17 | android:layout_height="wrap_content" | 18 | android:layout_height="wrap_content" |
| 18 | android:layout_centerVertical="true" | 19 | android:layout_centerVertical="true" |
| 19 | android:paddingLeft="20dp" | 20 | android:paddingLeft="20dp" |
| 20 | android:paddingRight="20dp" | 21 | android:paddingRight="20dp" |
| 21 | android:src="@mipmap/title_back" /> | 22 | android:src="@mipmap/title_back" /> |
| 22 | 23 | ||
| 23 | <TextView | 24 | <TextView |
| 24 | android:id="@+id/menu_title" | 25 | android:id="@+id/menu_title" |
| 25 | android:layout_width="wrap_content" | 26 | android:layout_width="wrap_content" |
| 26 | android:layout_height="wrap_content" | 27 | android:layout_height="wrap_content" |
| 27 | android:layout_centerInParent="true" | 28 | android:layout_centerInParent="true" |
| 28 | android:text="@string/change_electroniccard_info_fill" | 29 | android:text="@string/change_electroniccard_info_fill" |
| 29 | android:textColor="@android:color/white" | 30 | android:textColor="@android:color/white" |
| 30 | android:textSize="22sp" /> | 31 | android:textSize="22sp" /> |
| 31 | </RelativeLayout> | 32 | </RelativeLayout> |
| 32 | 33 | ||
| 33 | <ImageView | 34 | <ImageView |
| 34 | android:layout_width="wrap_content" | 35 | android:layout_width="wrap_content" |
| 35 | android:layout_height="wrap_content" | 36 | android:layout_height="wrap_content" |
| 36 | android:layout_gravity="center" | 37 | android:layout_gravity="center" |
| 37 | android:layout_marginTop="20dp" | 38 | android:layout_marginTop="20dp" |
| 38 | android:src="@mipmap/change_info_icon" /> | 39 | android:src="@mipmap/change_info_icon" /> |
| 40 | |||
| 39 | <LinearLayout | 41 | <LinearLayout |
| 40 | android:layout_width="wrap_content" | 42 | android:layout_width="wrap_content" |
| 41 | android:layout_height="wrap_content" | 43 | android:layout_height="wrap_content" |
| 42 | android:layout_marginTop="20dp" | 44 | android:layout_marginTop="20dp" |
| 43 | android:orientation="horizontal"> | 45 | android:orientation="horizontal"> |
| 46 | |||
| 44 | <View | 47 | <View |
| 45 | android:layout_width="450dp" | 48 | android:layout_width="450dp" |
| 46 | android:layout_height="0.7dp" | 49 | android:layout_height="0.7dp" |
| 47 | android:layout_marginLeft="150dp" | 50 | android:layout_marginLeft="150dp" |
| 48 | android:background="@color/electronic_text"> | 51 | android:background="@color/electronic_text"> |
| 49 | 52 | ||
| 50 | </View> | 53 | </View> |
| 54 | |||
| 51 | <View | 55 | <View |
| 52 | android:layout_width="400dp" | 56 | android:layout_width="400dp" |
| 53 | android:layout_height="0.7dp" | 57 | android:layout_height="0.7dp" |
| 54 | android:layout_marginLeft="80dp" | 58 | android:layout_marginLeft="80dp" |
| 55 | android:background="@color/electronic_text"> | 59 | android:background="@color/electronic_text"> |
| 56 | 60 | ||
| 57 | </View> | 61 | </View> |
| 58 | 62 | ||
| 59 | 63 | ||
| 60 | </LinearLayout> | 64 | </LinearLayout> |
| 61 | 65 | ||
| 62 | <LinearLayout | 66 | <LinearLayout |
| 63 | android:layout_width="match_parent" | 67 | android:layout_width="match_parent" |
| 64 | android:layout_height="wrap_content" | 68 | android:layout_height="wrap_content" |
| 65 | android:gravity="center_vertical" | 69 | android:gravity="center_vertical" |
| 66 | android:orientation="horizontal"> | 70 | android:orientation="horizontal"> |
| 67 | 71 | ||
| 68 | <LinearLayout | 72 | <LinearLayout |
| 69 | android:layout_width="wrap_content" | 73 | android:layout_width="wrap_content" |
| 70 | android:layout_height="80dp" | 74 | android:layout_height="80dp" |
| 71 | android:layout_marginLeft="200dp" | 75 | android:layout_marginLeft="200dp" |
| 72 | android:gravity="center_vertical"> | 76 | android:gravity="center_vertical"> |
| 73 | 77 | ||
| 74 | <TextView | 78 | <TextView |
| 75 | android:layout_width="wrap_content" | 79 | android:layout_width="wrap_content" |
| 76 | android:layout_height="wrap_content" | 80 | android:layout_height="wrap_content" |
| 77 | android:text="客户姓名" | 81 | android:text="客户姓名" |
| 78 | android:textColor="@color/btn_text_color" | 82 | android:textColor="@color/pickerview_wheelview_textcolor_center" |
| 79 | android:textSize="22sp" /> | 83 | android:textSize="22sp" /> |
| 80 | 84 | ||
| 81 | <EditText | 85 | <EditText |
| 82 | android:layout_width="wrap_content" | 86 | android:layout_width="wrap_content" |
| 83 | android:layout_height="wrap_content" | 87 | android:layout_height="wrap_content" |
| 84 | android:background="@null" | ||
| 85 | android:layout_marginLeft="50dp" | 88 | android:layout_marginLeft="50dp" |
| 86 | android:textColor="@color/electronic_text" | 89 | android:background="@null" |
| 87 | android:hint="请输入" | 90 | android:hint="请输入" |
| 91 | android:textColor="@color/electronic_text" | ||
| 88 | android:textSize="22sp" /> | 92 | android:textSize="22sp" /> |
| 89 | 93 | ||
| 90 | </LinearLayout> | 94 | </LinearLayout> |
| 91 | 95 | ||
| 92 | <LinearLayout | 96 | <LinearLayout |
| 93 | android:layout_width="wrap_content" | 97 | android:layout_width="wrap_content" |
| 94 | android:layout_height="80dp" | 98 | android:layout_height="80dp" |
| 95 | android:layout_marginLeft="300dp" | 99 | android:layout_marginLeft="300dp" |
| 96 | android:gravity="center_vertical"> | 100 | android:gravity="center_vertical"> |
| 97 | 101 | ||
| 98 | <TextView | 102 | <TextView |
| 99 | android:layout_width="wrap_content" | 103 | android:layout_width="wrap_content" |
| 100 | android:layout_height="wrap_content" | 104 | android:layout_height="wrap_content" |
| 101 | android:text="购买地址" | 105 | android:text="购买地址" |
| 102 | android:textColor="@color/btn_text_color" | 106 | android:textColor="@color/pickerview_wheelview_textcolor_center" |
| 103 | android:textSize="22sp" /> | 107 | android:textSize="22sp" /> |
| 104 | 108 | ||
| 105 | <TextView | 109 | <TextView |
| 106 | android:layout_width="wrap_content" | 110 | android:layout_width="wrap_content" |
| 107 | android:layout_height="wrap_content" | 111 | android:layout_height="wrap_content" |
| 108 | android:text="请选择地区" | ||
| 109 | android:layout_marginLeft="60dp" | 112 | android:layout_marginLeft="60dp" |
| 113 | android:text="请选择地区" | ||
| 110 | android:textColor="@color/btn_text_color" | 114 | android:textColor="@color/btn_text_color" |
| 111 | android:textSize="22sp" /> | 115 | android:textSize="22sp" /> |
| 112 | 116 | ||
| 113 | <ImageView | 117 | <ImageView |
| 114 | android:layout_width="wrap_content" | 118 | android:layout_width="wrap_content" |
| 115 | android:layout_height="wrap_content" | 119 | android:layout_height="wrap_content" |
| 116 | android:layout_marginLeft="50dp" | 120 | android:layout_marginLeft="50dp" |
| 117 | android:src="@mipmap/xiajiantou"> | 121 | android:src="@mipmap/xiajiantou"> |
| 118 | 122 | ||
| 119 | </ImageView> | 123 | </ImageView> |
| 120 | </LinearLayout> | 124 | </LinearLayout> |
| 121 | 125 | ||
| 122 | </LinearLayout> | 126 | </LinearLayout> |
| 127 | |||
| 123 | <LinearLayout | 128 | <LinearLayout |
| 124 | android:layout_width="wrap_content" | 129 | android:layout_width="wrap_content" |
| 125 | android:layout_height="wrap_content" | 130 | android:layout_height="wrap_content" |
| 126 | android:orientation="horizontal"> | 131 | android:orientation="horizontal"> |
| 132 | |||
| 127 | <View | 133 | <View |
| 128 | android:layout_width="450dp" | 134 | android:layout_width="450dp" |
| 129 | android:layout_height="0.7dp" | 135 | android:layout_height="0.7dp" |
| 130 | android:layout_marginLeft="150dp" | 136 | android:layout_marginLeft="150dp" |
| 131 | android:background="@color/electronic_text"> | 137 | android:background="@color/electronic_text"> |
| 132 | 138 | ||
| 133 | </View> | 139 | </View> |
| 140 | |||
| 134 | <View | 141 | <View |
| 135 | android:layout_width="400dp" | 142 | android:layout_width="400dp" |
| 136 | android:layout_height="0.7dp" | 143 | android:layout_height="0.7dp" |
| 137 | android:layout_marginLeft="80dp" | 144 | android:layout_marginLeft="80dp" |
| 138 | android:background="@color/electronic_text"> | 145 | android:background="@color/electronic_text"> |
| 139 | 146 | ||
| 140 | </View> | 147 | </View> |
| 141 | 148 | ||
| 142 | 149 | ||
| 143 | </LinearLayout> | 150 | </LinearLayout> |
| 144 | 151 | ||
| 145 | <LinearLayout | 152 | <LinearLayout |
| 146 | android:layout_width="match_parent" | 153 | android:layout_width="match_parent" |
| 147 | android:layout_height="wrap_content" | 154 | android:layout_height="wrap_content" |
| 148 | android:gravity="center_vertical" | 155 | android:gravity="center_vertical" |
| 149 | android:orientation="horizontal"> | 156 | android:orientation="horizontal"> |
| 150 | 157 | ||
| 151 | <LinearLayout | 158 | <LinearLayout |
| 152 | android:layout_width="wrap_content" | 159 | android:layout_width="wrap_content" |
| 153 | android:layout_height="80dp" | 160 | android:layout_height="80dp" |
| 154 | android:layout_marginLeft="200dp" | 161 | android:layout_marginLeft="200dp" |
| 155 | android:gravity="center_vertical"> | 162 | android:gravity="center_vertical"> |
| 156 | 163 | ||
| 157 | <TextView | 164 | <TextView |
| 158 | android:layout_width="wrap_content" | 165 | android:layout_width="wrap_content" |
| 159 | android:layout_height="wrap_content" | 166 | android:layout_height="wrap_content" |
| 160 | android:text="客户地址" | 167 | android:text="客户地址" |
| 161 | android:textColor="@color/btn_text_color" | 168 | android:textColor="@color/pickerview_wheelview_textcolor_center" |
| 162 | android:textSize="22sp" /> | 169 | android:textSize="22sp" /> |
| 163 | 170 | ||
| 164 | <TextView | 171 | <TextView |
| 165 | android:layout_width="wrap_content" | 172 | android:layout_width="wrap_content" |
| 166 | android:layout_height="wrap_content" | 173 | android:layout_height="wrap_content" |
| 167 | android:text="请选择地区" | ||
| 168 | android:layout_marginLeft="50dp" | 174 | android:layout_marginLeft="50dp" |
| 175 | android:text="请选择地区" | ||
| 169 | android:textSize="22sp" /> | 176 | android:textSize="22sp" /> |
| 170 | 177 | ||
| 171 | <ImageView | 178 | <ImageView |
| 172 | android:layout_width="wrap_content" | 179 | android:layout_width="wrap_content" |
| 173 | android:layout_height="wrap_content" | 180 | android:layout_height="wrap_content" |
| 174 | android:layout_marginLeft="50dp" | 181 | android:layout_marginLeft="50dp" |
| 175 | android:src="@mipmap/xiajiantou"> | 182 | android:src="@mipmap/xiajiantou"> |
| 176 | 183 | ||
| 177 | </ImageView> | 184 | </ImageView> |
| 178 | 185 | ||
| 179 | 186 | ||
| 180 | </LinearLayout> | 187 | </LinearLayout> |
| 181 | 188 | ||
| 182 | <LinearLayout | 189 | <LinearLayout |
| 183 | android:layout_width="wrap_content" | 190 | android:layout_width="wrap_content" |
| 184 | android:layout_height="80dp" | 191 | android:layout_height="80dp" |
| 185 | android:layout_marginLeft="200dp" | 192 | android:layout_marginLeft="200dp" |
| 186 | android:gravity="center_vertical"> | 193 | android:gravity="center_vertical"> |
| 194 | |||
| 187 | <TextView | 195 | <TextView |
| 188 | android:layout_width="wrap_content" | 196 | android:layout_width="wrap_content" |
| 189 | android:layout_height="wrap_content" | 197 | android:layout_height="wrap_content" |
| 190 | android:text=" " | 198 | android:text=" " |
| 191 | android:textColor="@color/white" | 199 | android:textColor="@color/white" |
| 192 | android:textSize="22sp" /> | 200 | android:textSize="22sp" /> |
| 201 | |||
| 193 | <EditText | 202 | <EditText |
| 194 | android:layout_width="wrap_content" | 203 | android:layout_width="wrap_content" |
| 195 | android:layout_height="wrap_content" | 204 | android:layout_height="wrap_content" |
| 196 | android:layout_marginLeft="98dp" | 205 | android:layout_marginLeft="98dp" |
| 197 | android:background="@null" | 206 | android:background="@null" |
| 198 | android:hint="请输入商店名称" | 207 | android:hint="请输入商店名称" |
| 199 | android:textSize="22sp" /> | 208 | android:textSize="22sp" /> |
| 200 | 209 | ||
| 201 | </LinearLayout> | 210 | </LinearLayout> |
| 202 | 211 | ||
| 203 | </LinearLayout> | 212 | </LinearLayout> |
| 213 | |||
| 204 | <LinearLayout | 214 | <LinearLayout |
| 205 | android:layout_width="wrap_content" | 215 | android:layout_width="wrap_content" |
| 206 | android:layout_height="wrap_content" | 216 | android:layout_height="wrap_content" |
| 207 | 217 | ||
| 208 | android:orientation="horizontal"> | 218 | android:orientation="horizontal"> |
| 219 | |||
| 209 | <View | 220 | <View |
| 210 | android:layout_width="450dp" | 221 | android:layout_width="450dp" |
| 211 | android:layout_height="0.7dp" | 222 | android:layout_height="0.7dp" |
| 212 | android:layout_marginLeft="150dp" | 223 | android:layout_marginLeft="150dp" |
| 213 | android:background="@color/electronic_text"> | 224 | android:background="@color/electronic_text"> |
| 214 | 225 | ||
| 215 | </View> | 226 | </View> |
| 227 | |||
| 216 | <View | 228 | <View |
| 217 | android:layout_width="400dp" | 229 | android:layout_width="400dp" |
| 218 | android:layout_height="0.7dp" | 230 | android:layout_height="0.7dp" |
| 219 | android:layout_marginLeft="80dp" | 231 | android:layout_marginLeft="80dp" |
| 220 | android:background="@color/electronic_text"> | 232 | android:background="@color/electronic_text"> |
| 221 | 233 | ||
| 222 | </View> | 234 | </View> |
| 223 | 235 | ||
| 224 | 236 | ||
| 225 | </LinearLayout> | 237 | </LinearLayout> |
| 226 | 238 | ||
| 227 | <LinearLayout | 239 | <LinearLayout |
| 228 | android:layout_width="match_parent" | 240 | android:layout_width="match_parent" |
| 229 | android:layout_height="wrap_content" | 241 | android:layout_height="wrap_content" |
| 230 | android:gravity="center_vertical" | 242 | android:gravity="center_vertical" |
| 231 | android:orientation="horizontal"> | 243 | android:orientation="horizontal"> |
| 232 | 244 | ||
| 233 | <LinearLayout | 245 | <LinearLayout |
| 234 | android:layout_width="wrap_content" | 246 | android:layout_width="wrap_content" |
| 235 | android:layout_height="80dp" | 247 | android:layout_height="80dp" |
| 236 | android:gravity="center_vertical" | 248 | android:layout_marginLeft="200dp" |
| 237 | android:layout_marginLeft="200dp"> | 249 | android:gravity="center_vertical"> |
| 250 | |||
| 238 | <TextView | 251 | <TextView |
| 239 | android:layout_width="wrap_content" | 252 | android:layout_width="wrap_content" |
| 240 | android:layout_height="wrap_content" | 253 | android:layout_height="wrap_content" |
| 241 | android:text=" " | 254 | android:text=" " |
| 242 | android:textColor="@color/white" | 255 | android:textColor="@color/white" |
| 243 | android:textSize="22sp" /> | 256 | android:textSize="22sp" /> |
| 244 | 257 | ||
| 245 | <EditText | 258 | <EditText |
| 246 | android:layout_width="wrap_content" | 259 | android:layout_width="wrap_content" |
| 247 | android:layout_height="wrap_content" | 260 | android:layout_height="wrap_content" |
| 248 | android:layout_marginLeft="100dp" | 261 | android:layout_marginLeft="100dp" |
| 249 | android:background="@null" | 262 | android:background="@null" |
| 250 | android:hint="请输入详细地址" | 263 | android:hint="请输入详细地址" |
| 251 | android:textSize="22sp" /> | 264 | android:textSize="22sp" /> |
| 252 | 265 | ||
| 253 | </LinearLayout> | 266 | </LinearLayout> |
| 254 | 267 | ||
| 255 | <LinearLayout | 268 | <LinearLayout |
| 256 | android:layout_width="wrap_content" | 269 | android:layout_width="wrap_content" |
| 257 | android:layout_height="80dp" | 270 | android:layout_height="80dp" |
| 258 | android:layout_marginLeft="210dp" | 271 | android:layout_marginLeft="210dp" |
| 259 | android:gravity="center_vertical"> | 272 | android:gravity="center_vertical"> |
| 260 | 273 | ||
| 261 | <TextView | 274 | <TextView |
| 262 | android:layout_width="wrap_content" | 275 | android:layout_width="wrap_content" |
| 263 | android:layout_height="wrap_content" | 276 | android:layout_height="wrap_content" |
| 264 | android:text="本地售后电话" | 277 | android:text="本地售后电话" |
| 265 | android:textColor="@color/btn_text_color" | 278 | android:textColor="@color/pickerview_wheelview_textcolor_center" |
| 266 | android:textSize="22sp" /> | 279 | android:textSize="22sp" /> |
| 267 | 280 | ||
| 268 | <EditText | 281 | <EditText |
| 269 | android:layout_width="wrap_content" | 282 | android:layout_width="wrap_content" |
| 270 | android:layout_height="wrap_content" | 283 | android:layout_height="wrap_content" |
| 271 | android:hint="请输入" | ||
| 272 | android:background="@null" | ||
| 273 | android:layout_marginLeft="25dp" | 284 | android:layout_marginLeft="25dp" |
| 285 | android:background="@null" | ||
| 286 | android:hint="请输入" | ||
| 274 | android:textColor="@color/btn_text_color" | 287 | android:textColor="@color/btn_text_color" |
| 275 | android:textSize="22sp" /> | 288 | android:textSize="22sp" /> |
| 276 | </LinearLayout> | 289 | </LinearLayout> |
| 277 | 290 | ||
| 278 | </LinearLayout> | 291 | </LinearLayout> |
| 292 | |||
| 279 | <LinearLayout | 293 | <LinearLayout |
| 280 | android:layout_width="wrap_content" | 294 | android:layout_width="wrap_content" |
| 281 | android:layout_height="wrap_content" | 295 | android:layout_height="wrap_content" |
| 282 | 296 | ||
| 283 | android:orientation="horizontal"> | 297 | android:orientation="horizontal"> |
| 298 | |||
| 284 | <View | 299 | <View |
| 285 | android:layout_width="450dp" | 300 | android:layout_width="450dp" |
| 286 | android:layout_height="0.7dp" | 301 | android:layout_height="0.7dp" |
| 287 | android:layout_marginLeft="150dp" | 302 | android:layout_marginLeft="150dp" |
| 288 | android:background="@color/electronic_text"> | 303 | android:background="@color/electronic_text"> |
| 289 | 304 | ||
| 290 | </View> | 305 | </View> |
| 306 | |||
| 291 | <View | 307 | <View |
| 292 | android:layout_width="400dp" | 308 | android:layout_width="400dp" |
| 293 | android:layout_height="0.7dp" | 309 | android:layout_height="0.7dp" |
| 294 | android:layout_marginLeft="80dp" | 310 | android:layout_marginLeft="80dp" |
| 295 | android:background="@color/electronic_text"> | 311 | android:background="@color/electronic_text"> |
| 296 | 312 | ||
| 297 | </View> | 313 | </View> |
| 298 | 314 | ||
| 299 | 315 | ||
| 300 | </LinearLayout> | 316 | </LinearLayout> |
| 301 | 317 | ||
| 302 | <LinearLayout | 318 | <LinearLayout |
| 303 | android:layout_width="match_parent" | 319 | android:layout_width="match_parent" |
| 304 | android:layout_height="wrap_content" | 320 | android:layout_height="wrap_content" |
| 305 | android:gravity="center_vertical" | 321 | android:gravity="center_vertical" |
| 306 | android:orientation="horizontal"> | 322 | android:orientation="horizontal"> |
| 307 | 323 | ||
| 308 | <LinearLayout | 324 | <LinearLayout |
| 309 | android:id="@+id/lineL_buy_time" | 325 | android:id="@+id/lineL_buy_time" |
| 310 | android:layout_width="wrap_content" | 326 | android:layout_width="wrap_content" |
| 311 | android:layout_height="80dp" | 327 | android:layout_height="80dp" |
| 312 | android:layout_marginLeft="200dp" | 328 | android:layout_marginLeft="200dp" |
| 313 | android:gravity="center_vertical"> | 329 | android:gravity="center_vertical"> |
| 314 | 330 | ||
| 315 | <TextView | 331 | <TextView |
| 316 | android:layout_width="wrap_content" | 332 | android:layout_width="wrap_content" |
| 317 | android:layout_height="wrap_content" | 333 | android:layout_height="wrap_content" |
| 318 | android:text="购买时间" | 334 | android:text="购买时间" |
| 319 | android:textColor="@color/btn_text_color" | 335 | android:textColor="@color/pickerview_wheelview_textcolor_center" |
| 320 | android:textSize="22sp" /> | 336 | android:textSize="22sp" /> |
| 321 | 337 | ||
| 322 | <TextView | 338 | <TextView |
| 323 | android:id="@+id/tv_buy_time" | 339 | android:id="@+id/tv_buy_time" |
| 324 | android:layout_width="wrap_content" | 340 | android:layout_width="wrap_content" |
| 325 | android:layout_height="wrap_content" | 341 | android:layout_height="wrap_content" |
| 326 | android:hint="请选择时间" | ||
| 327 | android:layout_marginLeft="50dp" | 342 | android:layout_marginLeft="50dp" |
| 343 | android:hint="请选择时间" | ||
| 328 | android:textSize="22sp" /> | 344 | android:textSize="22sp" /> |
| 345 | |||
| 329 | <ImageView | 346 | <ImageView |
| 330 | android:layout_width="wrap_content" | 347 | android:layout_width="wrap_content" |
| 331 | android:layout_height="wrap_content" | 348 | android:layout_height="wrap_content" |
| 332 | android:layout_marginLeft="50dp" | 349 | android:layout_marginLeft="50dp" |
| 333 | android:src="@mipmap/xiajiantou"> | 350 | android:src="@mipmap/xiajiantou"> |
| 334 | 351 | ||
| 335 | </ImageView> | 352 | </ImageView> |
| 336 | 353 | ||
| 337 | </LinearLayout> | 354 | </LinearLayout> |
| 338 | 355 | ||
| 339 | </LinearLayout> | 356 | </LinearLayout> |
| 357 | |||
| 340 | <LinearLayout | 358 | <LinearLayout |
| 341 | android:layout_width="wrap_content" | 359 | android:layout_width="wrap_content" |
| 342 | android:layout_height="wrap_content" | 360 | android:layout_height="wrap_content" |
| 343 | 361 | ||
| 344 | android:orientation="horizontal"> | 362 | android:orientation="horizontal"> |
| 363 | |||
| 345 | <View | 364 | <View |
| 346 | android:layout_width="450dp" | 365 | android:layout_width="450dp" |
| 347 | android:layout_height="0.7dp" | 366 | android:layout_height="0.7dp" |
| 348 | android:layout_marginLeft="150dp" | 367 | android:layout_marginLeft="150dp" |
| 349 | android:background="@color/electronic_text"> | 368 | android:background="@color/electronic_text"> |
| 350 | 369 | ||
| 351 | </View> | 370 | </View> |
| 352 | 371 | ||
| 353 | 372 | ||
| 354 | </LinearLayout> | 373 | </LinearLayout> |
| 374 | |||
| 355 | <Button | 375 | <Button |
| 376 | android:id="@+id/btn_ok" | ||
| 377 | style="@style/button_login_register_style" | ||
| 356 | android:layout_marginLeft="200dp" | 378 | android:layout_marginLeft="200dp" |
PersonalCenter/pickerview/src/main/java/com/bigkoo/pickerview/view/BasePickerView.java
| 1 | package com.bigkoo.pickerview.view; | 1 | package com.bigkoo.pickerview.view; |
| 2 | 2 | ||
| 3 | import android.app.Activity; | 3 | import android.app.Activity; |
| 4 | import android.app.Dialog; | 4 | import android.app.Dialog; |
| 5 | import android.content.Context; | 5 | import android.content.Context; |
| 6 | import android.content.DialogInterface; | 6 | import android.content.DialogInterface; |
| 7 | import android.graphics.Color; | 7 | import android.graphics.Color; |
| 8 | import android.view.Gravity; | 8 | import android.view.Gravity; |
| 9 | import android.view.KeyEvent; | 9 | import android.view.KeyEvent; |
| 10 | import android.view.LayoutInflater; | 10 | import android.view.LayoutInflater; |
| 11 | import android.view.MotionEvent; | 11 | import android.view.MotionEvent; |
| 12 | import android.view.View; | 12 | import android.view.View; |
| 13 | import android.view.ViewGroup; | 13 | import android.view.ViewGroup; |
| 14 | import android.view.animation.Animation; | 14 | import android.view.animation.Animation; |
| 15 | import android.view.animation.AnimationUtils; | 15 | import android.view.animation.AnimationUtils; |
| 16 | import android.widget.FrameLayout; | 16 | import android.widget.FrameLayout; |
| 17 | 17 | ||
| 18 | import com.bigkoo.pickerview.R; | 18 | import com.bigkoo.pickerview.R; |
| 19 | import com.bigkoo.pickerview.listener.OnDismissListener; | 19 | import com.bigkoo.pickerview.listener.OnDismissListener; |
| 20 | import com.bigkoo.pickerview.utils.PickerViewAnimateUtil; | 20 | import com.bigkoo.pickerview.utils.PickerViewAnimateUtil; |
| 21 | 21 | ||
| 22 | /** | 22 | /** |
| 23 | * Created by Sai on 15/11/22. | 23 | * Created by Sai on 15/11/22. |
| 24 | * 精仿iOSPickerViewController控件 | 24 | * 精仿iOSPickerViewController控件 |
| 25 | */ | 25 | */ |
| 26 | public class BasePickerView { | 26 | public class BasePickerView { |
| 27 | private final FrameLayout.LayoutParams params = new FrameLayout.LayoutParams( | 27 | private final FrameLayout.LayoutParams params = new FrameLayout.LayoutParams( |
| 28 | ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.BOTTOM | 28 | ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.CENTER |
| 29 | ); | 29 | ); |
| 30 | |||
| 31 | private Context context; | 30 | private Context context; |
| 32 | protected ViewGroup contentContainer; | 31 | protected ViewGroup contentContainer; |
| 33 | public ViewGroup decorView;//显示pickerview的根View,默认是activity的根view | 32 | public ViewGroup decorView;//显示pickerview的根View,默认是activity的根view |
| 34 | private ViewGroup rootView;//附加View 的 根View | 33 | private ViewGroup rootView;//附加View 的 根View |
| 35 | private ViewGroup dialogView;//附加Dialog 的 根View | 34 | private ViewGroup dialogView;//附加Dialog 的 根View |
| 36 | 35 | ||
| 37 | protected int pickerview_timebtn_nor = 0xFF057dff; | 36 | protected int pickerview_timebtn_nor = 0xFF057dff; |
| 38 | protected int pickerview_timebtn_pre = 0xFFc2daf5; | 37 | protected int pickerview_timebtn_pre = 0xFFc2daf5; |
| 39 | protected int pickerview_bg_topbar = 0xFFf5f5f5; | 38 | protected int pickerview_bg_topbar = 0xFFf5f5f5; |
| 40 | protected int pickerview_topbar_title = 0xFF000000; | 39 | protected int pickerview_topbar_title = 0xFF000000; |
| 41 | protected int bgColor_default = 0xFFFFFFFF; | 40 | protected int bgColor_default = 0xFFFFFFFF; |
| 42 | 41 | ||
| 43 | private OnDismissListener onDismissListener; | 42 | private OnDismissListener onDismissListener; |
| 44 | private boolean dismissing; | 43 | private boolean dismissing; |
| 45 | 44 | ||
| 46 | private Animation outAnim; | 45 | private Animation outAnim; |
| 47 | private Animation inAnim; | 46 | private Animation inAnim; |
| 48 | private boolean isShowing; | 47 | private boolean isShowing; |
| 49 | private int gravity = Gravity.BOTTOM; | 48 | private int gravity = Gravity.BOTTOM; |
| 50 | 49 | ||
| 51 | 50 | ||
| 52 | private Dialog mDialog; | 51 | private Dialog mDialog; |
| 53 | private boolean cancelable;//是否能取消 | 52 | private boolean cancelable;//是否能取消 |
| 54 | 53 | ||
| 55 | protected View clickView;//是通过哪个View弹出的 | 54 | protected View clickView;//是通过哪个View弹出的 |
| 56 | 55 | ||
| 57 | private boolean isAnim = true; | 56 | private boolean isAnim = true; |
| 58 | public BasePickerView(Context context) { | 57 | public BasePickerView(Context context) { |
| 59 | this.context = context; | 58 | this.context = context; |
| 60 | 59 | ||
| 61 | /*initViews(); | 60 | /*initViews(); |
| 62 | init(); | 61 | init(); |
| 63 | initEvents();*/ | 62 | initEvents();*/ |
| 64 | } | 63 | } |
| 65 | 64 | ||
| 66 | protected void initViews(int backgroudId) { | 65 | protected void initViews(int backgroudId) { |
| 67 | LayoutInflater layoutInflater = LayoutInflater.from(context); | 66 | LayoutInflater layoutInflater = LayoutInflater.from(context); |
| 68 | if (isDialog()) { | 67 | if (isDialog()) { |
| 69 | //如果是对话框模式 | 68 | //如果是对话框模式 |
| 70 | dialogView = (ViewGroup) layoutInflater.inflate(R.layout.layout_basepickerview, null, false); | 69 | dialogView = (ViewGroup) layoutInflater.inflate(R.layout.layout_basepickerview, null, false); |
| 71 | //设置界面的背景为透明 | 70 | //设置界面的背景为透明 |
| 72 | dialogView.setBackgroundColor(Color.TRANSPARENT); | 71 | dialogView.setBackgroundColor(Color.TRANSPARENT); |
| 73 | //这个是真正要加载时间选取器的父布局 | 72 | //这个是真正要加载时间选取器的父布局 |
| 74 | contentContainer = (ViewGroup) dialogView.findViewById(R.id.content_container); | 73 | contentContainer = (ViewGroup) dialogView.findViewById(R.id.content_container); |
| 75 | //设置对话框 左右间距屏幕30 | 74 | //设置对话框 左右间距屏幕30 |
| 76 | this.params.leftMargin = 30; | 75 | this.params.leftMargin = 30; |
| 77 | this.params.rightMargin = 30; | 76 | this.params.rightMargin = 30; |
| 78 | contentContainer.setLayoutParams(this.params); | 77 | contentContainer.setLayoutParams(this.params); |
| 79 | //创建对话框 | 78 | //创建对话框 |
| 80 | createDialog(); | 79 | createDialog(); |
| 81 | //给背景设置点击事件,这样当点击内容以外的地方会关闭界面 | 80 | //给背景设置点击事件,这样当点击内容以外的地方会关闭界面 |
| 82 | dialogView.setOnClickListener(new View.OnClickListener() { | 81 | dialogView.setOnClickListener(new View.OnClickListener() { |
| 83 | @Override | 82 | @Override |
| 84 | public void onClick(View view) { | 83 | public void onClick(View view) { |
| 85 | dismiss(); | 84 | dismiss(); |
| 86 | } | 85 | } |
| 87 | }); | 86 | }); |
| 88 | } else { | 87 | } else { |
| 89 | //如果只是要显示在屏幕的下方 | 88 | //如果只是要显示在屏幕的下方 |
| 90 | //decorView是activity的根View | 89 | //decorView是activity的根View |
| 91 | if (decorView == null) { | 90 | if (decorView == null) { |
| 92 | decorView = (ViewGroup) ((Activity) context).getWindow().getDecorView().findViewById(android.R.id.content); | 91 | decorView = (ViewGroup) ((Activity) context).getWindow().getDecorView().findViewById(android.R.id.content); |
| 93 | } | 92 | } |
| 94 | //将控件添加到decorView中 | 93 | //将控件添加到decorView中 |
| 95 | rootView = (ViewGroup) layoutInflater.inflate(R.layout.layout_basepickerview, decorView, false); | 94 | rootView = (ViewGroup) layoutInflater.inflate(R.layout.layout_basepickerview, decorView, false); |
| 96 | rootView.setLayoutParams(new FrameLayout.LayoutParams( | 95 | FrameLayout.LayoutParams rootparams = new FrameLayout.LayoutParams( |
| 97 | ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT | 96 | ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT, Gravity.CENTER |
| 98 | )); | 97 | ); |
| 98 | rootView.setLayoutParams(rootparams); | ||
| 99 | if (backgroudId != 0) { | 99 | if (backgroudId != 0) { |
| 100 | rootView.setBackgroundColor(backgroudId); | 100 | rootView.setBackgroundColor(backgroudId); |
| 101 | } | 101 | } |
| 102 | // rootView.setBackgroundColor(ContextCompat.getColor(context,backgroudId)); | 102 | // rootView.setBackgroundColor(ContextCompat.getColor(context,backgroudId)); |
| 103 | //这个是真正要加载时间选取器的父布局 | 103 | //这个是真正要加载时间选取器的父布局 |
| 104 | contentContainer = (ViewGroup) rootView.findViewById(R.id.content_container); | 104 | contentContainer = (ViewGroup) rootView.findViewById(R.id.content_container); |
| 105 | params.leftMargin = 500; | ||
| 106 | params.rightMargin= 500; | ||
| 105 | contentContainer.setLayoutParams(params); | 107 | contentContainer.setLayoutParams(params); |
| 106 | } | 108 | } |
| 107 | setKeyBackCancelable(true); | 109 | setKeyBackCancelable(true); |
| 108 | } | 110 | } |
| 109 | 111 | ||
| 110 | protected void init() { | 112 | protected void init() { |
| 111 | inAnim = getInAnimation(); | 113 | inAnim = getInAnimation(); |
| 112 | outAnim = getOutAnimation(); | 114 | outAnim = getOutAnimation(); |
| 113 | } | 115 | } |
| 114 | 116 | ||
| 115 | protected void initEvents() { | 117 | protected void initEvents() { |
| 116 | } | 118 | } |
| 117 | 119 | ||
| 118 | 120 | ||
| 119 | /** | 121 | /** |
| 120 | * @param v (是通过哪个View弹出的) | 122 | * @param v (是通过哪个View弹出的) |
| 121 | * @param isAnim 是否显示动画效果 | 123 | * @param isAnim 是否显示动画效果 |
| 122 | */ | 124 | */ |
| 123 | public void show(View v, boolean isAnim) { | 125 | public void show(View v, boolean isAnim) { |
| 124 | this.clickView = v; | 126 | this.clickView = v; |
| 125 | this.isAnim = isAnim; | 127 | this.isAnim = isAnim; |
| 126 | show(); | 128 | show(); |
| 127 | } | 129 | } |
| 128 | 130 | ||
| 129 | public void show(boolean isAnim) { | 131 | public void show(boolean isAnim) { |
| 130 | this.isAnim = isAnim; | 132 | this.isAnim = isAnim; |
| 131 | show(); | 133 | show(); |
| 132 | } | 134 | } |
| 133 | 135 | ||
| 134 | public void show(View v) { | 136 | public void show(View v) { |
| 135 | this.clickView = v; | 137 | this.clickView = v; |
| 136 | show(); | 138 | show(); |
| 137 | } | 139 | } |
| 138 | 140 | ||
| 139 | 141 | ||
| 140 | /** | 142 | /** |
| 141 | * 添加View到根视图 | 143 | * 添加View到根视图 |
| 142 | */ | 144 | */ |
| 143 | public void show() { | 145 | public void show() { |
| 144 | if (isDialog()) { | 146 | if (isDialog()) { |
| 145 | showDialog(); | 147 | showDialog(); |
| 146 | } else { | 148 | } else { |
| 147 | if (isShowing()) { | 149 | if (isShowing()) { |
| 148 | return; | 150 | return; |
| 149 | } | 151 | } |
| 150 | isShowing = true; | 152 | isShowing = true; |
| 151 | onAttached(rootView); | 153 | onAttached(rootView); |
| 152 | rootView.requestFocus(); | 154 | rootView.requestFocus(); |
| 153 | } | 155 | } |
| 154 | } | 156 | } |
| 155 | 157 | ||
| 156 | 158 | ||
| 157 | /** | 159 | /** |
| 158 | * show的时候调用 | 160 | * show的时候调用 |
| 159 | * | 161 | * |
| 160 | * @param view 这个View | 162 | * @param view 这个View |
| 161 | */ | 163 | */ |
| 162 | private void onAttached(View view) { | 164 | private void onAttached(View view) { |
| 163 | decorView.addView(view); | 165 | decorView.addView(view); |
| 164 | if(isAnim){ | 166 | if(isAnim){ |
| 165 | contentContainer.startAnimation(inAnim); | 167 | contentContainer.startAnimation(inAnim); |
| 166 | } | 168 | } |
| 167 | } | 169 | } |
| 168 | 170 | ||
| 169 | 171 | ||
| 170 | /** | 172 | /** |
| 171 | * 检测该View是不是已经添加到根视图 | 173 | * 检测该View是不是已经添加到根视图 |
| 172 | * | 174 | * |
| 173 | * @return 如果视图已经存在该View返回true | 175 | * @return 如果视图已经存在该View返回true |
| 174 | */ | 176 | */ |
| 175 | public boolean isShowing() { | 177 | public boolean isShowing() { |
| 176 | if (isDialog()) { | 178 | if (isDialog()) { |
| 177 | return false; | 179 | return false; |
| 178 | } else { | 180 | } else { |
| 179 | return rootView.getParent() != null || isShowing; | 181 | return rootView.getParent() != null || isShowing; |
| 180 | } | 182 | } |
| 181 | 183 | ||
| 182 | } | 184 | } |
| 183 | 185 | ||
| 184 | public void dismiss() { | 186 | public void dismiss() { |
| 185 | if (isDialog()) { | 187 | if (isDialog()) { |
| 186 | dismissDialog(); | 188 | dismissDialog(); |
| 187 | } else { | 189 | } else { |
| 188 | if (dismissing) { | 190 | if (dismissing) { |
| 189 | return; | 191 | return; |
| 190 | } | 192 | } |
| 191 | 193 | ||
| 192 | if (isAnim){ | 194 | if (isAnim){ |
| 193 | //消失动画 | 195 | //消失动画 |
| 194 | outAnim.setAnimationListener(new Animation.AnimationListener() { | 196 | outAnim.setAnimationListener(new Animation.AnimationListener() { |
| 195 | @Override | 197 | @Override |
| 196 | public void onAnimationStart(Animation animation) { | 198 | public void onAnimationStart(Animation animation) { |
| 197 | 199 | ||
| 198 | } | 200 | } |
| 199 | 201 | ||
| 200 | @Override | 202 | @Override |
| 201 | public void onAnimationEnd(Animation animation) { | 203 | public void onAnimationEnd(Animation animation) { |
| 202 | dismissImmediately(); | 204 | dismissImmediately(); |
| 203 | } | 205 | } |
| 204 | 206 | ||
| 205 | @Override | 207 | @Override |
| 206 | public void onAnimationRepeat(Animation animation) { | 208 | public void onAnimationRepeat(Animation animation) { |
| 207 | 209 | ||
| 208 | } | 210 | } |
| 209 | }); | 211 | }); |
| 210 | contentContainer.startAnimation(outAnim); | 212 | contentContainer.startAnimation(outAnim); |
| 211 | } else { | 213 | } else { |
| 212 | dismissImmediately(); | 214 | dismissImmediately(); |
| 213 | } | 215 | } |
| 214 | dismissing = true; | 216 | dismissing = true; |
| 215 | } | 217 | } |
| 216 | 218 | ||
| 217 | 219 | ||
| 218 | } | 220 | } |
| 219 | 221 | ||
| 220 | public void dismissImmediately() { | 222 | public void dismissImmediately() { |
| 221 | 223 | ||
| 222 | decorView.post(new Runnable() { | 224 | decorView.post(new Runnable() { |
| 223 | @Override | 225 | @Override |
| 224 | public void run() { | 226 | public void run() { |
| 225 | //从根视图移除 | 227 | //从根视图移除 |
| 226 | decorView.removeView(rootView); | 228 | decorView.removeView(rootView); |
| 227 | isShowing = false; | 229 | isShowing = false; |
| 228 | dismissing = false; | 230 | dismissing = false; |
| 229 | if (onDismissListener != null) { | 231 | if (onDismissListener != null) { |
| 230 | onDismissListener.onDismiss(BasePickerView.this); | 232 | onDismissListener.onDismiss(BasePickerView.this); |
| 231 | } | 233 | } |
| 232 | } | 234 | } |
| 233 | }); | 235 | }); |
| 234 | 236 | ||
| 235 | 237 | ||
| 236 | } | 238 | } |
| 237 | 239 | ||
| 238 | public Animation getInAnimation() { | 240 | public Animation getInAnimation() { |
| 239 | int res = PickerViewAnimateUtil.getAnimationResource(this.gravity, true); | 241 | int res = PickerViewAnimateUtil.getAnimationResource(this.gravity, true); |
| 240 | return AnimationUtils.loadAnimation(context, res); | 242 | return AnimationUtils.loadAnimation(context, res); |
| 241 | } | 243 | } |
| 242 | 244 | ||
| 243 | public Animation getOutAnimation() { | 245 | public Animation getOutAnimation() { |
| 244 | int res = PickerViewAnimateUtil.getAnimationResource(this.gravity, false); | 246 | int res = PickerViewAnimateUtil.getAnimationResource(this.gravity, false); |
| 245 | return AnimationUtils.loadAnimation(context, res); | 247 | return AnimationUtils.loadAnimation(context, res); |
| 246 | } | 248 | } |
| 247 | 249 | ||
| 248 | public BasePickerView setOnDismissListener(OnDismissListener onDismissListener) { | 250 | public BasePickerView setOnDismissListener(OnDismissListener onDismissListener) { |
| 249 | this.onDismissListener = onDismissListener; | 251 | this.onDismissListener = onDismissListener; |
| 250 | return this; | 252 | return this; |
| 251 | } | 253 | } |
| 252 | 254 | ||
| 253 | public void setKeyBackCancelable(boolean isCancelable) { | 255 | public void setKeyBackCancelable(boolean isCancelable) { |
| 254 | 256 | ||
| 255 | ViewGroup View; | 257 | ViewGroup View; |
| 256 | if (isDialog()) { | 258 | if (isDialog()) { |
| 257 | View = dialogView; | 259 | View = dialogView; |
| 258 | } else { | 260 | } else { |
| 259 | View = rootView; | 261 | View = rootView; |
| 260 | } | 262 | } |
| 261 | 263 | ||
| 262 | View.setFocusable(isCancelable); | 264 | View.setFocusable(isCancelable); |
| 263 | View.setFocusableInTouchMode(isCancelable); | 265 | View.setFocusableInTouchMode(isCancelable); |
| 264 | if (isCancelable) { | 266 | if (isCancelable) { |
| 265 | View.setOnKeyListener(onKeyBackListener); | 267 | View.setOnKeyListener(onKeyBackListener); |
| 266 | } else { | 268 | } else { |
| 267 | View.setOnKeyListener(null); | 269 | View.setOnKeyListener(null); |
| 268 | } | 270 | } |
| 269 | } | 271 | } |
| 270 | 272 | ||
| 271 | private View.OnKeyListener onKeyBackListener = new View.OnKeyListener() { | 273 | private View.OnKeyListener onKeyBackListener = new View.OnKeyListener() { |
| 272 | @Override | 274 | @Override |
| 273 | public boolean onKey(View v, int keyCode, KeyEvent event) { | 275 | public boolean onKey(View v, int keyCode, KeyEvent event) { |
| 274 | if (keyCode == KeyEvent.KEYCODE_BACK && event.getAction() == MotionEvent.ACTION_DOWN | 276 | if (keyCode == KeyEvent.KEYCODE_BACK && event.getAction() == MotionEvent.ACTION_DOWN |
| 275 | && isShowing()) { | 277 | && isShowing()) { |
| 276 | dismiss(); | 278 | dismiss(); |
| 277 | return true; | 279 | return true; |
| 278 | } | 280 | } |
| 279 | return false; | 281 | return false; |
| 280 | } | 282 | } |
| 281 | }; | 283 | }; |
| 282 | 284 | ||
| 283 | protected BasePickerView setOutSideCancelable(boolean isCancelable) { | 285 | protected BasePickerView setOutSideCancelable(boolean isCancelable) { |
| 284 | if (rootView != null) { | 286 | if (rootView != null) { |
| 285 | View view = rootView.findViewById(R.id.outmost_container); | 287 | View view = rootView.findViewById(R.id.outmost_container); |
| 286 | 288 | ||
| 287 | if (isCancelable) { | 289 | if (isCancelable) { |
| 288 | view.setOnTouchListener(onCancelableTouchListener); | 290 | view.setOnTouchListener(onCancelableTouchListener); |
| 289 | } else { | 291 | } else { |
| 290 | view.setOnTouchListener(null); | 292 | view.setOnTouchListener(null); |
| 291 | } | 293 | } |
| 292 | } | 294 | } |
| 293 | 295 | ||
| 294 | return this; | 296 | return this; |
| 295 | } | 297 | } |
| 296 | 298 | ||
| 297 | /** | 299 | /** |
| 298 | * 设置对话框模式是否可以点击外部取消 | 300 | * 设置对话框模式是否可以点击外部取消 |
| 299 | * | 301 | * |
| 300 | * @param cancelable | 302 | * @param cancelable |
| 301 | */ | 303 | */ |
| 302 | public void setDialogOutSideCancelable(boolean cancelable) { | 304 | public void setDialogOutSideCancelable(boolean cancelable) { |
| 303 | this.cancelable = cancelable; | 305 | this.cancelable = cancelable; |
| 304 | } | 306 | } |
| 305 | 307 | ||
| 306 | 308 | ||
| 307 | /** | 309 | /** |
| 308 | * Called when the user touch on black overlay in order to dismiss the dialog | 310 | * Called when the user touch on black overlay in order to dismiss the dialog |
| 309 | */ | 311 | */ |
| 310 | private final View.OnTouchListener onCancelableTouchListener = new View.OnTouchListener() { | 312 | private final View.OnTouchListener onCancelableTouchListener = new View.OnTouchListener() { |
| 311 | @Override | 313 | @Override |
| 312 | public boolean onTouch(View v, MotionEvent event) { | 314 | public boolean onTouch(View v, MotionEvent event) { |
| 313 | if (event.getAction() == MotionEvent.ACTION_DOWN) { | 315 | if (event.getAction() == MotionEvent.ACTION_DOWN) { |
| 314 | dismiss(); | 316 | dismiss(); |
| 315 | } | 317 | } |
| 316 | return false; | 318 | return false; |
| 317 | } | 319 | } |
| 318 | }; | 320 | }; |
| 319 | 321 | ||
| 320 | public View findViewById(int id) { | 322 | public View findViewById(int id) { |
| 321 | return contentContainer.findViewById(id); | 323 | return contentContainer.findViewById(id); |
| 322 | } | 324 | } |
| 323 | 325 | ||
| 324 | public void createDialog() { | 326 | public void createDialog() { |
| 325 | if (dialogView != null) { | 327 | if (dialogView != null) { |
| 326 | mDialog = new Dialog(context, R.style.custom_dialog2); | 328 | mDialog = new Dialog(context, R.style.custom_dialog2); |
| 327 | mDialog.setCancelable(cancelable);//不能点外面取消,也不 能点back取消 | 329 | mDialog.setCancelable(cancelable);//不能点外面取消,也不 能点back取消 |
| 328 | mDialog.setContentView(dialogView); | 330 | mDialog.setContentView(dialogView); |
| 329 | 331 | ||
| 330 | mDialog.getWindow().setWindowAnimations(R.style.pickerview_dialogAnim); | 332 | mDialog.getWindow().setWindowAnimations(R.style.pickerview_dialogAnim); |
| 331 | mDialog.setOnDismissListener(new DialogInterface.OnDismissListener() { | 333 | mDialog.setOnDismissListener(new DialogInterface.OnDismissListener() { |
| 332 | @Override | 334 | @Override |
| 333 | public void onDismiss(DialogInterface dialog) { | 335 | public void onDismiss(DialogInterface dialog) { |
| 334 | if (onDismissListener != null) { | 336 | if (onDismissListener != null) { |
| 335 | onDismissListener.onDismiss(BasePickerView.this); | 337 | onDismissListener.onDismiss(BasePickerView.this); |
| 336 | } | 338 | } |
| 337 | } | 339 | } |
| 338 | }); | 340 | }); |
| 339 | } | 341 | } |
| 340 | 342 | ||
| 341 | } | 343 | } |
| 342 | 344 | ||
| 343 | public void showDialog() { | 345 | public void showDialog() { |
| 344 | if (mDialog != null) { | 346 | if (mDialog != null) { |
| 345 | mDialog.show(); | 347 | mDialog.show(); |
| 346 | } | 348 | } |
| 347 | } | 349 | } |
| 348 | 350 | ||
| 349 | public void dismissDialog() { | 351 | public void dismissDialog() { |
| 350 | if (mDialog != null) { | 352 | if (mDialog != null) { |
| 351 | mDialog.dismiss(); | 353 | mDialog.dismiss(); |
| 352 | } | 354 | } |
| 353 | } | 355 | } |
| 354 | 356 | ||
| 355 | public boolean isDialog() { | 357 | public boolean isDialog() { |
| 356 | return false; | 358 | return false; |
| 357 | } | 359 | } |
| 358 | } | 360 | } |
PersonalCenter/pickerview/src/main/res/drawable/corcle_black_bg.xml
| File was created | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | <shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | android:shape="rectangle"> | ||
| 4 | <solid | ||
| 5 | android:color="@color/white"/> | ||
| 6 | <corners | ||
| 7 | android:bottomLeftRadius="20dp" | ||
| 8 | android:topLeftRadius="20dp" | ||
| 9 | android:bottomRightRadius="20dp" | ||
| 10 | android:topRightRadius="20dp"/> | ||
| 11 | <stroke android:width="1dp" | ||
| 12 | android:color="@color/login_edittext_hint"/> | ||
| 13 | </shape> |
PersonalCenter/pickerview/src/main/res/layout/layout_basepickerview.xml
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <FrameLayout | 2 | <FrameLayout |
| 3 | android:id="@+id/outmost_container" | 3 | android:id="@+id/outmost_container" |
| 4 | xmlns:android="http://schemas.android.com/apk/res/android" | 4 | xmlns:android="http://schemas.android.com/apk/res/android" |
| 5 | android:layout_width="match_parent" | 5 | android:layout_width="wrap_content" |
| 6 | android:layout_height="match_parent" | 6 | android:layout_height="wrap_content" |
| 7 | android:clickable="true" | 7 | android:background="@drawable/corcle_black_bg" |
| 8 | android:background="@color/pickerview_bgColor_overlay"> | 8 | android:padding="20dp" |
| 9 | android:clickable="true"> | ||
| 9 | 10 | ||
| 10 | <FrameLayout | 11 | <FrameLayout |
| 11 | android:id="@+id/content_container" | 12 | android:id="@+id/content_container" |
| 13 | android:padding="20dp" | ||
| 14 | android:background="@drawable/corcle_black_bg" | ||
| 12 | android:layout_width="wrap_content" | 15 | android:layout_width="wrap_content" |
| 13 | android:layout_height="wrap_content"> | 16 | android:layout_height="wrap_content"> |
| 14 | </FrameLayout> | 17 | </FrameLayout> |
| 15 | 18 | ||
| 16 | </FrameLayout> | 19 | </FrameLayout> |
PersonalCenter/pickerview/src/main/res/layout/pickerview_time.xml
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | 2 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | android:layout_width="wrap_content" | 3 | android:layout_width="wrap_content" |
| 4 | android:layout_height="wrap_content" | 4 | android:layout_height="wrap_content" |
| 5 | android:background="@color/pickerview_bgColor_default" | ||
| 6 | android:orientation="vertical"> | 5 | android:orientation="vertical"> |
| 7 | 6 | ||
| 8 | 7 | ||
| 9 | <LinearLayout | 8 | <LinearLayout |
| 10 | android:id="@+id/timepicker" | 9 | android:id="@+id/timepicker" |
| 11 | android:layout_width="match_parent" | 10 | android:layout_width="wrap_content" |
| 12 | android:layout_height="wrap_content" | 11 | android:layout_height="wrap_content" |
| 13 | android:background="@android:color/white" | ||
| 14 | android:orientation="horizontal"> | 12 | android:orientation="horizontal"> |
| 15 | 13 | ||
| 16 | <com.bigkoo.pickerview.lib.WheelView | 14 | <com.bigkoo.pickerview.lib.WheelView |
| 17 | android:id="@+id/year" | 15 | android:id="@+id/year" |
| 18 | android:layout_width="match_parent" | 16 | android:layout_width="match_parent" |
| 19 | android:layout_height="wrap_content" | 17 | android:layout_height="wrap_content" |
| 20 | android:layout_weight="0.96" /> | 18 | android:layout_weight="0.96" /> |
| 21 | 19 | ||
| 22 | <com.bigkoo.pickerview.lib.WheelView | 20 | <com.bigkoo.pickerview.lib.WheelView |
| 23 | 21 | ||
| 24 | android:id="@+id/month" | 22 | android:id="@+id/month" |
| 25 | android:layout_width="match_parent" | 23 | android:layout_width="match_parent" |
| 26 | android:layout_height="wrap_content" | 24 | android:layout_height="wrap_content" |
| 27 | android:layout_weight="1" /> | 25 | android:layout_weight="1" /> |
| 28 | 26 | ||
| 29 | <com.bigkoo.pickerview.lib.WheelView | 27 | <com.bigkoo.pickerview.lib.WheelView |
| 30 | android:id="@+id/day" | 28 | android:id="@+id/day" |
| 31 | android:layout_width="match_parent" | 29 | android:layout_width="match_parent" |
| 32 | android:layout_height="wrap_content" | 30 | android:layout_height="wrap_content" |
| 33 | android:layout_weight="1" /> | 31 | android:layout_weight="1" /> |
| 34 | 32 | ||
| 35 | <com.bigkoo.pickerview.lib.WheelView | 33 | <com.bigkoo.pickerview.lib.WheelView |
| 36 | android:id="@+id/hour" | 34 | android:id="@+id/hour" |
| 37 | android:layout_width="match_parent" | 35 | android:layout_width="match_parent" |
| 38 | android:layout_height="wrap_content" | 36 | android:layout_height="wrap_content" |
| 39 | android:layout_weight="1" /> | 37 | android:layout_weight="1" /> |
| 40 | 38 | ||
| 41 | <com.bigkoo.pickerview.lib.WheelView | 39 | <com.bigkoo.pickerview.lib.WheelView |
| 42 | android:id="@+id/min" | 40 | android:id="@+id/min" |
| 43 | android:layout_width="match_parent" | 41 | android:layout_width="match_parent" |
| 44 | android:layout_height="wrap_content" | 42 | android:layout_height="wrap_content" |
| 45 | android:layout_weight="1" /> | 43 | android:layout_weight="1" /> |
| 46 | 44 | ||
| 47 | <com.bigkoo.pickerview.lib.WheelView | 45 | <com.bigkoo.pickerview.lib.WheelView |
| 48 | android:id="@+id/second" | 46 | android:id="@+id/second" |
| 49 | android:layout_width="match_parent" | 47 | android:layout_width="match_parent" |
| 50 | android:layout_height="wrap_content" | 48 | android:layout_height="wrap_content" |
| 51 | android:layout_weight="1" /> | 49 | android:layout_weight="1" /> |
| 52 | </LinearLayout> | 50 | </LinearLayout> |
| 53 | <include | 51 | <include |
| 54 | layout="@layout/include_pickerview_topbar" | 52 | layout="@layout/include_pickerview_topbar" |
| 55 | android:layout_width="match_parent" | 53 | android:layout_width="match_parent" |
| 56 | android:layout_height="@dimen/pickerview_topbar_height" /> | 54 | android:layout_height="@dimen/pickerview_topbar_height" /> |
| 57 | 55 | ||
| 58 | 56 | ||
| 59 | </LinearLayout> | 57 | </LinearLayout> |
PersonalCenter/pickerview/src/main/res/values/colors.xml
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <resources> | 2 | <resources> |
| 3 | <color name="pickerview_timebtn_nor">#057dff</color> | 3 | <color name="pickerview_timebtn_nor">#057dff</color> |
| 4 | <color name="pickerview_timebtn_pre">#c2daf5</color> | 4 | <color name="pickerview_timebtn_pre">#c2daf5</color> |
| 5 | <color name="pickerview_bg_topbar">#f5f5f5</color> | 5 | <color name="pickerview_bg_topbar">#f5f5f5</color> |
| 6 | 6 | <color name="white">#ffffffff</color> | |
| 7 | <color name="login_edittext_hint">#afafaf</color> | ||
| 7 | <color name="pickerview_topbar_title">#000000</color> | 8 | <color name="pickerview_topbar_title">#000000</color> |
| 8 | <color name="pickerview_wheelview_textcolor_out">#a8a8a8</color> | 9 | <color name="pickerview_wheelview_textcolor_out">#a8a8a8</color> |
| 9 | <color name="pickerview_wheelview_textcolor_center">#2a2a2a</color> | 10 | <color name="pickerview_wheelview_textcolor_center">#2a2a2a</color> |
| 10 | <color name="pickerview_wheelview_textcolor_divider">#d5d5d5</color> | 11 | <color name="pickerview_wheelview_textcolor_divider">#d5d5d5</color> |
| 11 | <color name="pickerview_bgColor_overlay">#60000000</color> | 12 | <color name="pickerview_bgColor_overlay">#60000000</color> |
| 12 | <color name="pickerview_bgColor_default">#FFFFFFFF</color> | 13 | <color name="pickerview_bgColor_default">#FFFFFFFF</color> |
| 13 | 14 | ||
| 14 | </resources> | 15 | </resources> |
| 15 | 16 |