-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathArtistProfileFragment.java
More file actions
81 lines (65 loc) · 2.38 KB
/
ArtistProfileFragment.java
File metadata and controls
81 lines (65 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
package com.example.anjum.nithyostava_artist.artistinfo.artistprofile;
import android.os.Bundle;
import android.support.v7.widget.AppCompatTextView;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import com.example.anjum.nithyostava_artist.Dashboard.DashboardActivity;
import com.example.anjum.nithyostava_artist.Onboarding.User;
import com.example.anjum.nithyostava_artist.R;
import com.example.anjum.nithyostava_artist.base.BaseFragment;
import com.example.anjum.nithyostava_artist.utils.SharedPreference;
import com.google.gson.Gson;
import javax.inject.Inject;
import butterknife.BindView;
import butterknife.OnClick;
public class ArtistProfileFragment extends BaseFragment implements ArtistProfileContract.View{
@Inject
ArtistProfilePresenter userProfilePresenter;
@BindView( R.id.tv_Title)
AppCompatTextView tv_Title;
@BindView( R.id.iv_profile )
ImageView iv_profile;
@BindView( R.id.tv_name )
TextView tv_name;
@BindView( R.id.tv_fname)
TextView tv_fname;
@BindView( R.id.et_mobile )
EditText et_mobile;
@BindView( R.id.et_email )
EditText et_emaill;
@BindView( R.id.et_skills )
TextView et_skills;
@BindView( R.id.et_address )
EditText et_address;
@Override
protected void init(Bundle savedInstanceState)
{ userProfilePresenter.setView(this);
((DashboardActivity)getActivity()).getSupportActionBar().hide();
tv_Title.setText("My Profile");
User user = new Gson().fromJson( SharedPreference.getInstance().getString("user"), User.class);
tv_fname.setText(user.getFirstName()+" "+user.getLastName() );
tv_name.setText(user.getFirstName()+" "+user.getLastName() );
et_mobile.setText( user.getPhone() );
et_emaill.setText( user.getEmail() );
et_skills.setText( (CharSequence) user.getSkills() );
et_address.setText( user.getAddress() );
}
@Override
protected int getContentResource() {
return R.layout.fragment_artist_profile;
}
@Override
protected Object getModule()
{ return new ArtistProfileModule(); }
@Override
public void onFailure(Throwable throwable) {
}
@OnClick(R.id.iv_Back)
protected void onClickBack()
{ if ( getActivity()!=null )
getActivity().onBackPressed(); }
@Override
public void userprofileRes(User user) {
}
}