8
8
import android .view .View ;
9
9
import android .view .ViewGroup ;
10
10
import android .widget .ImageView ;
11
+ import android .widget .TextView ;
12
+ import android .widget .Toast ;
11
13
14
+ import com .google .gson .Gson ;
12
15
import com .zhuolang .main .R ;
16
+ import com .zhuolang .main .common .APPConfig ;
17
+ import com .zhuolang .main .model .DoctorDto ;
13
18
import com .zhuolang .main .ui .activity .*;
19
+ import com .zhuolang .main .utils .SharedPrefsUtil ;
14
20
15
21
/**
16
22
* Created by wnf on 2016/10/29.
@@ -26,6 +32,10 @@ public class HomepageTabFragment extends Fragment implements View.OnClickListene
26
32
private ImageView imageAppoint = null ;//预约挂号
27
33
private ImageView imageMyAppoint = null ;//我的预约
28
34
private ImageView imageConsult = null ;//我的咨询
35
+ private TextView tv_appointMine ;
36
+ private TextView tv_history ;
37
+
38
+ private String type ;
29
39
30
40
@ Override
31
41
public View onCreateView (final LayoutInflater inflater , final ViewGroup container , Bundle savedInstanceState ) {
@@ -41,14 +51,24 @@ public View onCreateView(final LayoutInflater inflater, final ViewGroup containe
41
51
*初始化数据
42
52
*/
43
53
private void initView (View view ) {
54
+ type = SharedPrefsUtil .getValue (getContext (), APPConfig .TYPE , "" );
55
+ tv_appointMine = (TextView ) view .findViewById (R .id .tv_homep_appointmine );
56
+ tv_history = (TextView ) view .findViewById (R .id .tv_homep_history );
44
57
imageConsult = (ImageView ) view .findViewById (R .id .image_item_consult );
45
- imageConsult .setOnClickListener (this );
46
58
imageDoctor = (ImageView ) view .findViewById (R .id .image_item_doctor );
47
- imageDoctor .setOnClickListener (this );
48
59
imageAppoint = (ImageView ) view .findViewById (R .id .image_item_appointment );
49
- imageAppoint .setOnClickListener (this );
50
60
imageMyAppoint = (ImageView ) view .findViewById (R .id .image_item_myappointment );
61
+ if (type .equals ("1" )){
62
+ tv_appointMine .setText ("预约我的" );
63
+ tv_history .setText ("历史记录" );
64
+ }else {
65
+ tv_appointMine .setText ("我的预约" );
66
+ tv_history .setText ("我的咨询" );
67
+ }
68
+ imageAppoint .setOnClickListener (this );
51
69
imageMyAppoint .setOnClickListener (this );
70
+ imageDoctor .setOnClickListener (this );
71
+ imageConsult .setOnClickListener (this );
52
72
}
53
73
54
74
@ Override
0 commit comments