Commit e54c424ab126459baa3a0de75830591a9d62e614
1 parent
c55b3db1a7
Exists in
master
完善对话框
Showing
9 changed files
with
63 additions
and
37 deletions
Show diff stats
PersonalCenter/.idea/gradle.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="GradleSettings"> | 3 | <component name="GradleSettings"> |
4 | <option name="linkedExternalProjectsSettings"> | 4 | <option name="linkedExternalProjectsSettings"> |
5 | <GradleProjectSettings> | 5 | <GradleProjectSettings> |
6 | <option name="distributionType" value="DEFAULT_WRAPPED" /> | 6 | <option name="distributionType" value="LOCAL" /> |
7 | <option name="externalProjectPath" value="$PROJECT_DIR$" /> | 7 | <option name="externalProjectPath" value="$PROJECT_DIR$" /> |
8 | <option name="gradleHome" value="C:\Program Files\Android\Android Studio\gradle\gradle-2.14.1" /> | ||
8 | <option name="modules"> | 9 | <option name="modules"> |
9 | <set> | 10 | <set> |
10 | <option value="$PROJECT_DIR$" /> | 11 | <option value="$PROJECT_DIR$" /> |
11 | <option value="$PROJECT_DIR$/app" /> | 12 | <option value="$PROJECT_DIR$/app" /> |
12 | <option value="$PROJECT_DIR$/circledialog" /> | 13 | <option value="$PROJECT_DIR$/circledialog" /> |
13 | </set> | 14 | </set> |
14 | </option> | 15 | </option> |
15 | <option name="resolveModulePerSourceSet" value="false" /> | 16 | <option name="resolveModulePerSourceSet" value="false" /> |
16 | </GradleProjectSettings> | 17 | </GradleProjectSettings> |
17 | </option> | 18 | </option> |
18 | </component> | 19 | </component> |
19 | </project> | 20 | </project> |
PersonalCenter/.idea/misc.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="EntryPointsManager"> | 3 | <component name="EntryPointsManager"> |
4 | <entry_points version="2.0" /> | 4 | <entry_points version="2.0" /> |
5 | </component> | 5 | </component> |
6 | <component name="NullableNotNullManager"> | 6 | <component name="NullableNotNullManager"> |
7 | <option name="myDefaultNullable" value="android.support.annotation.Nullable" /> | 7 | <option name="myDefaultNullable" value="android.support.annotation.Nullable" /> |
8 | <option name="myDefaultNotNull" value="android.support.annotation.NonNull" /> | 8 | <option name="myDefaultNotNull" value="android.support.annotation.NonNull" /> |
9 | <option name="myNullables"> | 9 | <option name="myNullables"> |
10 | <value> | 10 | <value> |
11 | <list size="4"> | 11 | <list size="4"> |
12 | <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" /> | 12 | <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" /> |
13 | <item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" /> | 13 | <item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" /> |
14 | <item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" /> | 14 | <item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" /> |
15 | <item index="3" class="java.lang.String" itemvalue="android.support.annotation.Nullable" /> | 15 | <item index="3" class="java.lang.String" itemvalue="android.support.annotation.Nullable" /> |
16 | </list> | 16 | </list> |
17 | </value> | 17 | </value> |
18 | </option> | 18 | </option> |
19 | <option name="myNotNulls"> | 19 | <option name="myNotNulls"> |
20 | <value> | 20 | <value> |
21 | <list size="4"> | 21 | <list size="4"> |
22 | <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" /> | 22 | <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" /> |
23 | <item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" /> | 23 | <item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" /> |
24 | <item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" /> | 24 | <item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" /> |
25 | <item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" /> | 25 | <item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" /> |
26 | </list> | 26 | </list> |
27 | </value> | 27 | </value> |
28 | </option> | 28 | </option> |
29 | </component> | 29 | </component> |
30 | <component name="ProjectInspectionProfilesVisibleTreeState"> | ||
31 | <entry key="Project Default"> | ||
32 | <profile-state> | ||
33 | <expanded-state> | ||
34 | <State> | ||
35 | <id /> | ||
36 | </State> | ||
37 | <State> | ||
38 | <id>Class structureJava</id> | ||
39 | </State> | ||
40 | <State> | ||
41 | <id>Code maturity issuesJava</id> | ||
42 | </State> | ||
43 | <State> | ||
44 | <id>Java</id> | ||
45 | </State> | ||
46 | <State> | ||
47 | <id>Java language level migration aidsJava</id> | ||
48 | </State> | ||
49 | <State> | ||
50 | <id>Javadoc issuesJava</id> | ||
51 | </State> | ||
52 | <State> | ||
53 | <id>Performance issuesJava</id> | ||
54 | </State> | ||
55 | <State> | ||
56 | <id>TestNGJava</id> | ||
57 | </State> | ||
58 | <State> | ||
59 | <id>Threading issuesJava</id> | ||
60 | </State> | ||
61 | </expanded-state> | ||
62 | <selected-state> | ||
63 | <State> | ||
64 | <id>Android</id> | ||
65 | </State> | ||
66 | </selected-state> | ||
67 | </profile-state> | ||
68 | </entry> | ||
69 | </component> | ||
30 | <component name="ProjectLevelVcsManager" settingsEditedManually="false"> | 70 | <component name="ProjectLevelVcsManager" settingsEditedManually="false"> |
31 | <OptionsSetting value="true" id="Add" /> | 71 | <OptionsSetting value="true" id="Add" /> |
32 | <OptionsSetting value="true" id="Remove" /> | 72 | <OptionsSetting value="true" id="Remove" /> |
33 | <OptionsSetting value="true" id="Checkout" /> | 73 | <OptionsSetting value="true" id="Checkout" /> |
34 | <OptionsSetting value="true" id="Update" /> | 74 | <OptionsSetting value="true" id="Update" /> |
35 | <OptionsSetting value="true" id="Status" /> | 75 | <OptionsSetting value="true" id="Status" /> |
36 | <OptionsSetting value="true" id="Edit" /> | 76 | <OptionsSetting value="true" id="Edit" /> |
37 | <ConfirmationsSetting value="0" id="Add" /> | 77 | <ConfirmationsSetting value="0" id="Add" /> |
38 | <ConfirmationsSetting value="0" id="Remove" /> | 78 | <ConfirmationsSetting value="0" id="Remove" /> |
39 | </component> | 79 | </component> |
40 | <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> | 80 | <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> |
41 | <output url="file://$PROJECT_DIR$/build/classes" /> | 81 | <output url="file://$PROJECT_DIR$/build/classes" /> |
42 | </component> | 82 | </component> |
43 | <component name="ProjectType"> | 83 | <component name="ProjectType"> |
44 | <option name="id" value="Android" /> | 84 | <option name="id" value="Android" /> |
45 | </component> | 85 | </component> |
46 | <component name="masterDetails"> |
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$/PersonalCenter.iml" filepath="$PROJECT_DIR$/PersonalCenter.iml" /> | ||
7 | <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" /> | ||
8 | <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" /> |
9 | <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" /> |
10 | </modules> | 8 | </modules> |
11 | </component> | 9 | </component> |
12 | </project> | 10 | </project> |
PersonalCenter/app/src/main/AndroidManifest.xml
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <manifest xmlns:android="http://schemas.android.com/apk/res/android" | 2 | <manifest xmlns:android="http://schemas.android.com/apk/res/android" |
3 | package="com.hjx.personalcenter"> | 3 | package="com.hjx.personalcenter"> |
4 | 4 | ||
5 | <application | 5 | <application |
6 | android:allowBackup="true" | 6 | android:allowBackup="true" |
7 | android:icon="@mipmap/ic_launcher" | 7 | android:icon="@mipmap/ic_launcher" |
8 | android:label="@string/app_name" | 8 | android:label="@string/app_name" |
9 | android:supportsRtl="true" | 9 | android:supportsRtl="true" |
10 | android:theme="@style/Theme.AppCompat.NoActionBar"> | 10 | android:theme="@style/Theme.AppCompat.Light.NoActionBar"> |
11 | <activity | 11 | <activity |
12 | android:name=".activity.MainActivity" | 12 | android:name=".activity.MainActivity" |
13 | android:launchMode="singleTask" | 13 | android:launchMode="singleTask" |
14 | android:screenOrientation="landscape"> | 14 | android:screenOrientation="landscape"> |
15 | <intent-filter> | 15 | <intent-filter> |
16 | <action android:name="android.intent.action.MAIN" /> | 16 | <action android:name="android.intent.action.MAIN" /> |
17 | 17 | ||
18 | <category android:name="android.intent.category.LAUNCHER" /> | 18 | <category android:name="android.intent.category.LAUNCHER" /> |
19 | </intent-filter> | 19 | </intent-filter> |
20 | </activity> | 20 | </activity> |
21 | <activity | 21 | <activity |
22 | android:name=".activity.LoginAndRegisterActivity" | 22 | android:name=".activity.LoginAndRegisterActivity" |
23 | android:launchMode="singleTask" | 23 | android:launchMode="singleTask" |
24 | android:screenOrientation="landscape"> | 24 | android:screenOrientation="landscape"> |
25 | 25 | ||
26 | </activity> | 26 | </activity> |
27 | <activity | 27 | <activity |
28 | android:name=".activity.ForgotPasswordActivity" | 28 | android:name=".activity.ForgotPasswordActivity" |
29 | android:launchMode="singleTask" | 29 | android:launchMode="singleTask" |
30 | android:screenOrientation="landscape"> | 30 | android:screenOrientation="landscape"> |
31 | 31 | ||
32 | </activity> | 32 | </activity> |
33 | <activity | 33 | <activity |
34 | android:name=".activity.ChangePasswordActivity" | 34 | android:name=".activity.ChangePasswordActivity" |
35 | android:launchMode="singleTask" | 35 | android:launchMode="singleTask" |
36 | android:screenOrientation="landscape"> | 36 | android:screenOrientation="landscape"> |
37 | 37 | ||
38 | </activity> | 38 | </activity> |
39 | <activity | 39 | <activity |
40 | android:name=".activity.RegisterInfoActivity" | 40 | android:name=".activity.RegisterInfoActivity" |
41 | android:launchMode="singleTask" | 41 | android:launchMode="singleTask" |
42 | android:screenOrientation="landscape"> | 42 | android:screenOrientation="landscape"> |
43 | 43 | ||
44 | </activity> | 44 | </activity> |
45 | <activity | 45 | <activity |
46 | android:name=".activity.ElectronicCardValidationActivity" | 46 | android:name=".activity.ElectronicCardValidationActivity" |
47 | android:launchMode="singleTask" | 47 | android:launchMode="singleTask" |
48 | android:screenOrientation="landscape"> | 48 | android:screenOrientation="landscape"> |
49 | 49 | ||
50 | </activity> | 50 | </activity> |
51 | <activity | 51 | <activity |
52 | android:name=".activity.ChangeBangDingActivity" | 52 | android:name=".activity.ChangeBangDingActivity" |
53 | android:launchMode="singleTask" | 53 | android:launchMode="singleTask" |
54 | android:screenOrientation="landscape"> | 54 | android:screenOrientation="landscape"> |
55 | 55 | ||
56 | </activity> | 56 | </activity> |
57 | <activity | 57 | <activity |
58 | android:name=".activity.ChangeElectronicCardInfoActivity" | 58 | android:name=".activity.ChangeElectronicCardInfoActivity" |
59 | android:launchMode="singleTask" | 59 | android:launchMode="singleTask" |
60 | android:screenOrientation="landscape"> | 60 | android:screenOrientation="landscape"> |
61 | 61 | ||
62 | </activity> | 62 | </activity> |
63 | <activity | 63 | <activity |
64 | android:name=".activity.ChangeEletronicCardPhone" | 64 | android:name=".activity.ChangeEletronicCardPhone" |
65 | android:launchMode="singleTask" | 65 | android:launchMode="singleTask" |
66 | android:screenOrientation="landscape"> | 66 | android:screenOrientation="landscape"> |
67 | 67 | ||
68 | </activity> | 68 | </activity> |
69 | <activity | 69 | <activity |
70 | android:name=".activity.ChoiseTextBookActivity" | 70 | android:name=".activity.ChoiseTextBookActivity" |
71 | android:launchMode="singleTask" | 71 | android:launchMode="singleTask" |
72 | android:screenOrientation="landscape"> | 72 | android:screenOrientation="landscape"> |
73 | 73 | ||
74 | </activity> | 74 | </activity> |
75 | <activity | 75 | <activity |
76 | android:name=".activity.TheStartPageActivity" | 76 | android:name=".activity.TheStartPageActivity" |
77 | android:launchMode="singleTask" | 77 | android:launchMode="singleTask" |
78 | android:screenOrientation="landscape"> | 78 | android:screenOrientation="landscape"> |
79 | 79 | ||
80 | </activity> | 80 | </activity> |
81 | </application> | 81 | </application> |
82 | 82 | ||
83 | </manifest> | 83 | </manifest> |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/customdialog/ElectronicCardDialog.java
1 | package com.hjx.personalcenter.customdialog; | 1 | package com.hjx.personalcenter.customdialog; |
2 | 2 | ||
3 | import android.content.Context; | 3 | import android.content.Context; |
4 | import android.content.Intent; | 4 | import android.content.Intent; |
5 | import android.graphics.Color; | ||
5 | import android.os.Bundle; | 6 | import android.os.Bundle; |
7 | import android.view.Gravity; | ||
6 | import android.view.LayoutInflater; | 8 | import android.view.LayoutInflater; |
7 | import android.view.View; | 9 | import android.view.View; |
8 | import android.view.ViewGroup; | 10 | import android.view.ViewGroup; |
9 | 11 | ||
10 | import com.hjx.personalcenter.R; | 12 | import com.hjx.personalcenter.R; |
11 | import com.hjx.personalcenter.activity.TheStartPageActivity; | 13 | import com.hjx.personalcenter.activity.TheStartPageActivity; |
12 | import com.mylhyl.circledialog.BaseCircleDialog; | 14 | import com.mylhyl.circledialog.BaseCircleDialog; |
13 | import com.mylhyl.circledialog.res.values.CircleDimen; | 15 | import com.mylhyl.circledialog.res.values.CircleDimen; |
14 | 16 | ||
15 | /** | 17 | /** |
16 | * Created by h on 2017/8/10. | 18 | * Created by h on 2017/8/10. |
17 | */ | 19 | */ |
18 | 20 | ||
19 | public class ElectronicCardDialog extends BaseCircleDialog { | 21 | public class ElectronicCardDialog extends BaseCircleDialog { |
20 | public static ElectronicCardDialog getInstance() { | 22 | public static ElectronicCardDialog getInstance() { |
21 | ElectronicCardDialog dialogFragment = new ElectronicCardDialog(); | 23 | ElectronicCardDialog dialogFragment = new ElectronicCardDialog(); |
22 | dialogFragment.setCanceledBack(true); | 24 | dialogFragment.setCanceledBack(true); |
23 | dialogFragment.setCanceledOnTouchOutside(true); | 25 | dialogFragment.setCanceledOnTouchOutside(true); |
24 | dialogFragment.setRadius(CircleDimen.RADIUS); | 26 | dialogFragment.setRadius(CircleDimen.RADIUS); |
25 | dialogFragment.setWidth(0.8f); | 27 | dialogFragment.setWidth(0.8f); |
28 | dialogFragment.setGravity(Gravity.CENTER); | ||
29 | dialogFragment.setBackgroundColor(Color.WHITE); | ||
26 | return dialogFragment; | 30 | return dialogFragment; |
27 | } | 31 | } |
28 | @Override | 32 | @Override |
29 | public View createView(Context context, LayoutInflater inflater, ViewGroup container) { | 33 | public View createView(Context context, LayoutInflater inflater, ViewGroup container) { |
30 | return inflater.inflate(R.layout.custom_adilog_electroniccard, container, false); | 34 | return inflater.inflate(R.layout.custom_adilog_electroniccard, container, false); |
31 | } | 35 | } |
32 | @Override | 36 | @Override |
33 | public void onActivityCreated(Bundle savedInstanceState) { | 37 | public void onActivityCreated(Bundle savedInstanceState) { |
34 | super.onActivityCreated(savedInstanceState); | 38 | super.onActivityCreated(savedInstanceState); |
35 | getView().findViewById(R.id.fill_card).setOnClickListener(new View.OnClickListener() { | 39 | getView().findViewById(R.id.fill_card).setOnClickListener(new View.OnClickListener() { |
36 | @Override | 40 | @Override |
37 | public void onClick(View v) { | 41 | public void onClick(View v) { |
38 | Intent intent = new Intent(); | 42 | Intent intent = new Intent(); |
39 | intent.setClass(getActivity(),TheStartPageActivity.class); | 43 | intent.setClass(getActivity(),TheStartPageActivity.class); |
40 | startActivity(intent); | 44 | startActivity(intent); |
41 | getActivity().overridePendingTransition(R.anim.rightin, R.anim.rightout); | 45 | getActivity().overridePendingTransition(R.anim.rightin, R.anim.rightout); |
42 | 46 | ||
43 | } | 47 | } |
44 | }); | 48 | }); |
45 | 49 | ||
46 | } | 50 | } |
47 | 51 | ||
48 | } | 52 | } |
49 | 53 |
PersonalCenter/app/src/main/java/com/hjx/personalcenter/customdialog/ListDialog.java
1 | package com.hjx.personalcenter.customdialog; | 1 | package com.hjx.personalcenter.customdialog; |
2 | 2 | ||
3 | import android.content.Context; | 3 | import android.content.Context; |
4 | import android.graphics.Color; | ||
4 | import android.os.Bundle; | 5 | import android.os.Bundle; |
6 | import android.view.Gravity; | ||
5 | import android.view.LayoutInflater; | 7 | import android.view.LayoutInflater; |
6 | import android.view.View; | 8 | import android.view.View; |
7 | import android.view.ViewGroup; | 9 | import android.view.ViewGroup; |
8 | import android.widget.AdapterView; | 10 | import android.widget.AdapterView; |
9 | import android.widget.ArrayAdapter; | 11 | import android.widget.ArrayAdapter; |
10 | import android.widget.ListView; | 12 | import android.widget.ListView; |
11 | import android.widget.Toast; | 13 | import android.widget.Toast; |
12 | 14 | ||
13 | import com.hjx.personalcenter.R; | 15 | import com.hjx.personalcenter.R; |
14 | import com.mylhyl.circledialog.BaseCircleDialog; | 16 | import com.mylhyl.circledialog.BaseCircleDialog; |
15 | import com.mylhyl.circledialog.res.values.CircleDimen; | 17 | import com.mylhyl.circledialog.res.values.CircleDimen; |
16 | 18 | ||
17 | import java.util.ArrayList; | 19 | import java.util.ArrayList; |
18 | 20 | ||
19 | /**自定义列表对话框 | 21 | /**自定义列表对话框 |
20 | * Created by h on 2017/8/10. | 22 | * Created by h on 2017/8/10. |
21 | */ | 23 | */ |
22 | 24 | ||
23 | public class ListDialog extends BaseCircleDialog implements AdapterView.OnItemClickListener { | 25 | public class ListDialog extends BaseCircleDialog implements AdapterView.OnItemClickListener { |
24 | ArrayAdapter listadapter; | 26 | ArrayAdapter listadapter; |
25 | ListView listView; | 27 | ListView listView; |
26 | ArrayList<String> data = new ArrayList<>(); | 28 | ArrayList<String> data = new ArrayList<>(); |
27 | public static ListDialog getInstance() { | 29 | public static ListDialog getInstance() { |
28 | ListDialog dialogFragment = new ListDialog(); | 30 | ListDialog dialogFragment = new ListDialog(); |
29 | dialogFragment.setCanceledBack(true); | 31 | dialogFragment.setCanceledBack(true); |
30 | dialogFragment.setCanceledOnTouchOutside(true); | 32 | dialogFragment.setCanceledOnTouchOutside(true); |
31 | dialogFragment.setRadius(CircleDimen.RADIUS); | 33 | dialogFragment.setRadius(CircleDimen.RADIUS); |
32 | dialogFragment.setWidth(0.5f); | 34 | dialogFragment.setWidth(0.5f); |
35 | dialogFragment.setGravity(Gravity.CENTER); | ||
36 | dialogFragment.setBackgroundColor(Color.WHITE); | ||
33 | return dialogFragment; | 37 | return dialogFragment; |
34 | } | 38 | } |
35 | @Override | 39 | @Override |
36 | public View createView(Context context, LayoutInflater inflater, ViewGroup container) { | 40 | public View createView(Context context, LayoutInflater inflater, ViewGroup container) { |
37 | 41 | ||
38 | return inflater.inflate(R.layout.custom_adilog_list, container, false); | 42 | return inflater.inflate(R.layout.custom_adilog_list, container, false); |
39 | } | 43 | } |
40 | @Override | 44 | @Override |
41 | public void onActivityCreated(Bundle savedInstanceState) { | 45 | public void onActivityCreated(Bundle savedInstanceState) { |
42 | super.onActivityCreated(savedInstanceState); | 46 | super.onActivityCreated(savedInstanceState); |
43 | listView = (ListView) getView().findViewById(R.id.listadapter); | 47 | listView = (ListView) getView().findViewById(R.id.listadapter); |
44 | for (int i=0;i<=50;i++){ | 48 | for (int i=0;i<=50;i++){ |
45 | data.add("sss"+i); | 49 | data.add("sss"+i); |
46 | } | 50 | } |
47 | 51 | ||
48 | listadapter = new ArrayAdapter(getActivity(),R.layout.custom_adilog_list_item,R.id.list_items,data); | 52 | listadapter = new ArrayAdapter(getActivity(),R.layout.custom_adilog_list_item,R.id.list_items,data); |
49 | listView.setAdapter(listadapter); | 53 | listView.setAdapter(listadapter); |
50 | listView.setOnItemClickListener(this); | 54 | listView.setOnItemClickListener(this); |
51 | 55 | ||
52 | } | 56 | } |
53 | 57 | ||
54 | @Override | 58 | @Override |
55 | public void onItemClick(AdapterView<?> parent, View view, int position, long id) { | 59 | public void onItemClick(AdapterView<?> parent, View view, int position, long id) { |
56 | Toast.makeText(getActivity(),"你点击了第"+position+"个",Toast.LENGTH_LONG).show(); | 60 | Toast.makeText(getActivity(),"你点击了第"+position+"个",Toast.LENGTH_LONG).show(); |
57 | 61 | ||
58 | dismiss(); | 62 | dismiss(); |
59 | 63 | ||
60 | } | 64 | } |
61 | } | 65 | } |
62 | 66 |
PersonalCenter/app/src/main/res/drawable/corcle_white_bg.xml
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <shape xmlns:android="http://schemas.android.com/apk/res/android" | 2 | <shape xmlns:android="http://schemas.android.com/apk/res/android" |
3 | android:shape="rectangle"> | 3 | android:shape="rectangle"> |
4 | <solid | 4 | <solid |
5 | android:color="@color/white"/> | 5 | android:color="@color/colorAccent"/> |
6 | <corners | 6 | <corners |
7 | android:bottomLeftRadius="100dp" | 7 | android:bottomLeftRadius="20dp" |
8 | android:topLeftRadius="100dp" | 8 | android:topLeftRadius="20dp" |
9 | android:bottomRightRadius="100dp" | 9 | android:bottomRightRadius="20dp" |
10 | android:topRightRadius="100dp"/> | 10 | android:topRightRadius="20dp"/> |
11 | <stroke android:width="1dp" | 11 | <stroke android:width="1dp" |
12 | android:color="@color/cutoff_line"/> | 12 | android:color="@color/cutoff_line"/> |
13 | </shape> | 13 | </shape> |
PersonalCenter/app/src/main/res/layout/custom_adilog_electroniccard.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:orientation="vertical" android:layout_width="match_parent" | 3 | android:orientation="vertical" |
4 | android:layout_height="match_parent" | 4 | android:layout_width="match_parent" |
5 | android:background="@android:color/white"> | 5 | android:layout_height="600dp"> |
6 | <RelativeLayout | 6 | <RelativeLayout |
7 | android:id="@+id/title" | 7 | android:id="@+id/title" |
8 | android:layout_width="match_parent" | 8 | android:layout_width="match_parent" |
9 | android:layout_height="wrap_content" | 9 | android:layout_height="wrap_content" |
10 | android:background="@android:color/white" | ||
11 | android:minHeight="70dp" > | 10 | android:minHeight="70dp" > |
12 | 11 | ||
13 | <ImageView | 12 | <ImageView |
14 | android:id="@+id/cancel" | 13 | android:id="@+id/cancel" |
15 | android:layout_width="wrap_content" | 14 | android:layout_width="wrap_content" |
16 | android:layout_height="wrap_content" | 15 | android:layout_height="wrap_content" |
17 | android:layout_centerVertical="true" | 16 | android:layout_centerVertical="true" |
18 | android:layout_alignParentRight="true" | 17 | android:layout_alignParentRight="true" |
19 | android:padding="20dp" | 18 | android:padding="20dp" |
20 | android:src="@mipmap/cancel_fork" /> | 19 | android:src="@mipmap/cancel_fork" /> |
21 | 20 | ||
22 | </RelativeLayout> | 21 | </RelativeLayout> |
23 | <RelativeLayout | 22 | <RelativeLayout |
24 | android:gravity="center" | 23 | android:gravity="center" |
25 | android:layout_gravity="clip_horizontal" | 24 | android:layout_gravity="clip_horizontal" |
26 | android:layout_width="match_parent" | 25 | android:layout_width="match_parent" |
27 | android:background="@android:color/white" | ||
28 | android:layout_height="wrap_content"> | 26 | android:layout_height="wrap_content"> |
29 | <ImageView | 27 | <ImageView |
30 | android:layout_width="wrap_content" | 28 | android:layout_width="wrap_content" |
31 | android:src="@mipmap/electroniccard" | 29 | android:src="@mipmap/electroniccard" |
32 | android:layout_height="wrap_content" /> | 30 | android:layout_height="wrap_content" /> |
33 | </RelativeLayout> | 31 | </RelativeLayout> |
34 | <LinearLayout | 32 | <LinearLayout |
35 | android:orientation="vertical" | 33 | android:orientation="vertical" |
36 | android:background="@android:color/white" | ||
37 | android:layout_width="match_parent" | 34 | android:layout_width="match_parent" |
38 | android:layout_height="wrap_content"> | 35 | android:layout_height="wrap_content"> |
39 | <TextView | 36 | <TextView |
40 | android:layout_gravity="center" | 37 | android:layout_gravity="center" |
41 | android:layout_marginTop="30dp" | 38 | android:layout_marginTop="30dp" |
42 | android:textSize="15sp" | 39 | android:textSize="15sp" |
43 | android:layout_width="wrap_content" | 40 | android:layout_width="wrap_content" |
44 | android:layout_height="wrap_content" | 41 | android:layout_height="wrap_content" |
45 | android:textColor="@color/electronic_card" | 42 | android:textColor="@color/electronic_card" |
46 | android:text="@string/electronic_card1"/> | 43 | android:text="@string/electronic_card1"/> |
47 | <TextView | 44 | <TextView |
48 | android:layout_gravity="center" | 45 | android:layout_gravity="center" |
49 | android:layout_width="wrap_content" | 46 | android:layout_width="wrap_content" |
50 | android:layout_height="wrap_content" | 47 | android:layout_height="wrap_content" |
48 | android:layout_marginTop="5dp" | ||
51 | android:textSize="15sp" | 49 | android:textSize="15sp" |
52 | android:textColor="@color/electronic_card" | 50 | android:textColor="@color/electronic_card" |
53 | android:text="@string/electronic_card2"/> | 51 | android:text="@string/electronic_card2"/> |
54 | <View | 52 | <View |
55 | android:layout_marginTop="20dp" | 53 | android:layout_marginTop="20dp" |
56 | android:layout_width="match_parent" | 54 | android:layout_width="match_parent" |
57 | android:background="@color/login_edittext_hint" | 55 | android:background="@color/login_edittext_hint" |
58 | android:layout_height="0.7dp"> | 56 | android:layout_height="0.7dp"> |
59 | 57 | ||
60 | </View> | 58 | </View> |
61 | 59 | ||
62 | <TextView | 60 | <TextView |
63 | android:id="@+id/fill_card" | 61 | android:id="@+id/fill_card" |
64 | android:layout_gravity="center" | 62 | android:layout_gravity="center" |
65 | android:layout_marginTop="20dp" | 63 | android:layout_marginTop="30dp" |
66 | android:layout_width="wrap_content" | 64 | android:layout_width="wrap_content" |
67 | android:layout_height="wrap_content" | 65 | android:layout_height="wrap_content" |
68 | android:textSize="15sp" | 66 | android:textSize="15sp" |
69 | android:textColor="@color/login_text_black" | 67 | android:textColor="@color/login_text_black" |
70 | android:text="@string/string_electroniccard_info_fill"/> | 68 | android:text="@string/string_electroniccard_info_fill"/> |
71 | 69 | ||
72 | </LinearLayout> | 70 | </LinearLayout> |
73 | <LinearLayout | 71 | <LinearLayout |
74 | android:orientation="vertical" | 72 | android:orientation="vertical" |
75 | android:background="@android:color/white" | ||
76 | android:layout_width="match_parent" | 73 | android:layout_width="match_parent" |
77 | android:layout_height="30dp"> | 74 | android:layout_height="30dp"> |
78 | </LinearLayout> | 75 | </LinearLayout> |
79 | 76 | ||
80 | 77 |
PersonalCenter/app/src/main/res/layout/custom_adilog_list.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="@android:color/white" | ||
12 | android:minHeight="70dp" > | 11 | android:minHeight="70dp" > |
13 | 12 | ||
14 | <ImageView | 13 | <ImageView |
15 | android:id="@+id/cancel" | 14 | android:id="@+id/cancel" |
16 | android:layout_width="wrap_content" | 15 | android:layout_width="wrap_content" |
17 | android:layout_height="wrap_content" | 16 | android:layout_height="wrap_content" |
18 | android:layout_centerVertical="true" | 17 | android:layout_centerVertical="true" |
19 | android:layout_alignParentRight="true" | 18 | android:layout_alignParentRight="true" |
20 | android:padding="20dp" | 19 | android:padding="20dp" |
21 | android:src="@mipmap/cancel_fork" /> | 20 | android:src="@mipmap/cancel_fork" /> |
22 | 21 | ||
23 | <TextView | 22 | <TextView |
24 | android:id="@+id/menu_title" | 23 | android:id="@+id/menu_title" |
25 | android:layout_width="wrap_content" | 24 | android:layout_width="wrap_content" |
26 | android:layout_height="wrap_content" | 25 | android:layout_height="wrap_content" |
27 | android:layout_centerInParent="true" | 26 | android:layout_centerInParent="true" |
28 | android:padding="20dp" | 27 | android:padding="20dp" |
29 | android:text="选年级" | 28 | android:text="选年级" |
30 | android:textColor="@android:color/black" | 29 | android:textColor="@android:color/black" |
31 | android:textSize="22sp" /> | 30 | android:textSize="22sp" /> |
32 | </RelativeLayout> | 31 | </RelativeLayout> |
33 | <ListView | 32 | <ListView |
34 | android:id="@+id/listadapter" | 33 | android:id="@+id/listadapter" |
35 | android:background="@android:color/white" | ||
36 | android:layout_width="match_parent" | 34 | android:layout_width="match_parent" |
37 | android:layout_height="match_parent"> | 35 | android:layout_height="400dp"> |
38 | 36 | ||
39 | </ListView> | 37 | </ListView> |
40 | </LinearLayout> | 38 | </LinearLayout> |
41 | 39 |