本文整理汇总了Java中com.facebook.login.widget.ProfilePictureView类的典型用法代码示例。如果您正苦于以下问题:Java ProfilePictureView类的具体用法?Java ProfilePictureView怎么用?Java ProfilePictureView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ProfilePictureView类属于com.facebook.login.widget包,在下文中一共展示了ProfilePictureView类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: CustomViewHolder
import com.facebook.login.widget.ProfilePictureView; //导入依赖的package包/类
public CustomViewHolder(View itemView) {
super(itemView);
this.txtView = (TextView) itemView.findViewById(R.id.listText);
this.txtLocate = (TextView) itemView.findViewById(R.id.listLocate);
this.txtName = (TextView) itemView.findViewById(R.id.name);
this.proFile = (ProfilePictureView) itemView.findViewById(R.id.profile_picturefeed);
this.smile = (ImageButton) itemView.findViewById(R.id.smile);
this.sad = (ImageButton) itemView.findViewById(R.id.sad);
this.comment = (ImageButton) itemView.findViewById(R.id.commentbtn);
this.smileCount = (TextView) itemView.findViewById(R.id.smilecount);
this.sadCount = (TextView) itemView.findViewById(R.id.sadcount);
this.pic = (ImageView) itemView.findViewById(R.id.imagetest);
this.commentView = (RecyclerView) itemView.findViewById(R.id.recycler_viewcomment);
this.proFileCom = (ProfilePictureView) itemView.findViewById(R.id.profile_picturecommentself);
this.send = (Button) itemView.findViewById(R.id.commentsendbtn);
this.txtComment = (EditText) itemView.findViewById(R.id.commenttext);
this.rl = (RelativeLayout) itemView.findViewById(R.id.relative);
this.commentCount = (TextView) itemView.findViewById(R.id.commentcount);
this.setting = (ImageButton) itemView.findViewById(R.id.setting);
this.time = (TextView) itemView.findViewById(R.id.time);
}
示例2: onCreate
import com.facebook.login.widget.ProfilePictureView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.addproject_layout);
Intent intent = getIntent();
String name = intent.getExtras().getString("name");
String email = intent.getExtras().getString("email");
String userId = intent.getExtras().getString("userid");
profilePictureView = (ProfilePictureView) findViewById(R.id.friendProfilePicture);
profilePictureView.setProfileId(userId);
txtName = (TextView)findViewById(R.id.textViewName);
txtName.setText(name);
txtEmail = (TextView)findViewById(R.id.textViewEmail);
txtEmail.setText(email);
btnProject = (Button)findViewById(R.id.buttonProject);
btnProject.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent createIntent = new Intent(AddProject.this, CreateProject.class);
startActivity(createIntent);
}
});
}
示例3: initComponents
import com.facebook.login.widget.ProfilePictureView; //导入依赖的package包/类
/**
* Initialises buttons on this xml with their respective elements. Updates facebook profile if
* changed because the Profile is loaded asynchronously so it returns null right after log in.
*/
private void initComponents() {
playButton = (Button) findViewById(R.id.playButton);
solveButton = (Button) findViewById(R.id.solveButton);
logOutButton = (Button) findViewById(R.id.log_out_button);
welcomeView = (TextView) findViewById(R.id.user_name);
profilePictureView = (ProfilePictureView) findViewById(R.id.profile_picture);
// Checks if the profile is changed and hence current profile is null. If so updates the profile
if (Profile.getCurrentProfile() != null) {
welcomeView.setText(WELCOME_TAG + Profile.getCurrentProfile().getName());
profilePictureView.setProfileId(Profile.getCurrentProfile().getId());
} else {
ProfileTracker profileTracker = new ProfileTracker() {
@Override
protected void onCurrentProfileChanged(Profile oldProfile, Profile currentProfile) {
this.stopTracking();
Profile.setCurrentProfile(currentProfile);
profilePictureView.setProfileId(currentProfile.getId());
welcomeView.setText(WELCOME_TAG + currentProfile.getName());
}
};
profileTracker.startTracking();
}
intentPlay = new Intent(this, PlayActivity.class);
intentSolve = new Intent(this, SolveActivity.class);
intentLogIn = new Intent(this, LogInActivity.class);
}
示例4: getView
import com.facebook.login.widget.ProfilePictureView; //导入依赖的package包/类
@Override
public View getView(int position, View convertView, ViewGroup parent) {
FbPage page = getItem(position);
if (convertView == null) {
convertView = LayoutInflater.from(getContext()).inflate(R.layout.item_page, parent, false);
}
TextView tvName = (TextView) convertView.findViewById(R.id.page_name_tv);
ProfilePictureView pagePicture = (ProfilePictureView) convertView.findViewById(R.id.pageItemPicture);
tvName.setText(page.getName());
pagePicture.setProfileId(page.getID());
return convertView;
}
示例5: getView
import com.facebook.login.widget.ProfilePictureView; //导入依赖的package包/类
@Override
public View getView(int position, View convertView, ViewGroup parent) {
final FbUserComment comment = getItem(position);
if (convertView == null) {
convertView = LayoutInflater.from(getContext()).inflate(R.layout.item_user_feed_comment, parent, false);
}
//region init
comment_tv = (TextView)convertView.findViewById(R.id.user_feed_comment_mess_tv);
created_tv = (TextView)convertView.findViewById(R.id.user_feed_comment_created_tv);
profilePictureView = (ProfilePictureView)convertView.findViewById(R.id.user_comment_picture);
user_name = (TextView)convertView.findViewById(R.id.fb_user_name);
//endregion init
//region get mess, user,..
comment_tv.setText(comment.getMessage());
created_tv.setText(comment.getCreated_time());
profilePictureView.setProfileId(comment.getUser());
GraphRequest request = GraphRequest.newGraphPathRequest(
AccessToken.getCurrentAccessToken(),
"/" + comment.getUser(),
new GraphRequest.Callback() {
@Override
public void onCompleted(GraphResponse response) {
try {
user_name.setText(response.getJSONObject().getString("name"));
} catch (JSONException e) {
e.printStackTrace();
}
}
});
request.executeAsync();
//endregion get mess, user,..
return convertView;
}
示例6: onCreate
import com.facebook.login.widget.ProfilePictureView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_scar);
// Intent i = getIntent();
// latit = i.getStringExtra("lati");
// longtit = i.getStringExtra("longti");
// System.out.println(latit + longtit);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
drawer.setDrawerListener(toggle);
toggle.syncState();
NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
navigationView.setNavigationItemSelectedListener(this);
View nav_header = LayoutInflater.from(this).inflate(R.layout.nav_header_main, null);
profile = Profile.getCurrentProfile();
((TextView)nav_header.findViewById(R.id.data_ffffffname)).setText(profile.getName());
((ProfilePictureView)nav_header.findViewById(R.id.profile_picture)).setProfileId(profile.getId());
navigationView.addHeaderView(nav_header);
mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());
// Set up the ViewPager with the sections adapter.
mViewPager = (ViewPager) findViewById(R.id.container);
mViewPager.setAdapter(mSectionsPagerAdapter);
tabLayout = (TabLayout) findViewById(R.id.tabs);
tabLayout.setupWithViewPager(mViewPager);
new SimpleTask().execute("http://203.151.92.179:8080/getuserprofile?id=" + MemberStatic.getFbID());
}
示例7: onCreate
import com.facebook.login.widget.ProfilePictureView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_bgroup);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
drawer.setDrawerListener(toggle);
toggle.syncState();
NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
navigationView.setNavigationItemSelectedListener(this);
View nav_header = LayoutInflater.from(this).inflate(R.layout.nav_header_main, null);
profile = Profile.getCurrentProfile();
((TextView)nav_header.findViewById(R.id.data_ffffffname)).setText(profile.getName());
((ProfilePictureView)nav_header.findViewById(R.id.profile_picture)).setProfileId(profile.getId());
navigationView.addHeaderView(nav_header);
jG = (Button) findViewById(R.id.joinG);
cG = (Button) findViewById(R.id.createG);
join();
create();
}
示例8: onCreate
import com.facebook.login.widget.ProfilePictureView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_user);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
drawer.setDrawerListener(toggle);
toggle.syncState();
NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
navigationView.setNavigationItemSelectedListener(this);
View nav_header = LayoutInflater.from(this).inflate(R.layout.nav_header_main, null);
profile = Profile.getCurrentProfile();
((TextView)nav_header.findViewById(R.id.data_ffffffname)).setText(profile.getName());
((ProfilePictureView)nav_header.findViewById(R.id.profile_picture)).setProfileId(profile.getId());
navigationView.addHeaderView(nav_header);
profile = Profile.getCurrentProfile();
new SimpleTask().execute("http://203.151.92.179:8080/getuserprofile?id=" + MemberStatic.getFbID());
profileSet( profile);
rs = (ImageView)findViewById(R.id.reset);
reset();
}
示例9: onCreate
import com.facebook.login.widget.ProfilePictureView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_group);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
drawer.setDrawerListener(toggle);
toggle.syncState();
NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
navigationView.setNavigationItemSelectedListener(this);
View nav_header = LayoutInflater.from(this).inflate(R.layout.nav_header_main, null);
profile = Profile.getCurrentProfile();
((TextView)nav_header.findViewById(R.id.data_ffffffname)).setText(profile.getName());
((ProfilePictureView)nav_header.findViewById(R.id.profile_picture)).setProfileId(profile.getId());
navigationView.addHeaderView(nav_header);
mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());
// Set up the ViewPager with the sections adapter.
mViewPager = (ViewPager) findViewById(R.id.container);
mViewPager.setAdapter(mSectionsPagerAdapter);
tabLayout = (TabLayout) findViewById(R.id.tabs);
tabLayout.setupWithViewPager(mViewPager);
new SimpleTaskG().execute("http://203.151.92.179:8080/getgroupprofile?id=" + MemberStatic.getFbID());
// lG = (Button)findViewById(R.id.leaveG);
// leave();
}
示例10: onCreate
import com.facebook.login.widget.ProfilePictureView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_leagroup);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
drawer.setDrawerListener(toggle);
toggle.syncState();
NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
navigationView.setNavigationItemSelectedListener(this);
View nav_header = LayoutInflater.from(this).inflate(R.layout.nav_header_main, null);
profile = Profile.getCurrentProfile();
((TextView)nav_header.findViewById(R.id.data_ffffffname)).setText(profile.getName());
((ProfilePictureView)nav_header.findViewById(R.id.profile_picture)).setProfileId(profile.getId());
navigationView.addHeaderView(nav_header);
mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());
// Set up the ViewPager with the sections adapter.
mViewPager = (ViewPager) findViewById(R.id.container);
mViewPager.setAdapter(mSectionsPagerAdapter);
tabLayout = (TabLayout) findViewById(R.id.tabs);
tabLayout.setupWithViewPager(mViewPager);
new SimpleTaskG().execute("http://203.151.92.179:8080/getgroupprofile?id=" + MemberStatic.getFbID());
// dG = (Button)findViewById(R.id.disbandG);
// disband();
}
示例11: onCreate
import com.facebook.login.widget.ProfilePictureView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_board);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
drawer.setDrawerListener(toggle);
toggle.syncState();
NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
navigationView.setNavigationItemSelectedListener(this);
View nav_header = LayoutInflater.from(this).inflate(R.layout.nav_header_main, null);
profile = Profile.getCurrentProfile();
((TextView)nav_header.findViewById(R.id.data_ffffffname)).setText(profile.getName());
((ProfilePictureView)nav_header.findViewById(R.id.profile_picture)).setProfileId(profile.getId());
navigationView.addHeaderView(nav_header);
mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());
// Set up the ViewPager with the sections adapter.
mViewPager = (ViewPager) findViewById(R.id.container);
mViewPager.setAdapter(mSectionsPagerAdapter);
tabLayout = (TabLayout) findViewById(R.id.tabs);
tabLayout.setupWithViewPager(mViewPager);
new SimpleTask().execute("http://203.151.92.179:8080/getuserprofile?id=" + MemberStatic.getFbID());
}
示例12: CommentHolder
import com.facebook.login.widget.ProfilePictureView; //导入依赖的package包/类
public CommentHolder(View itemView) {
super(itemView);
this.pictureView = (ProfilePictureView) itemView.findViewById(R.id.profile_picturecomment);
this.txtName = (TextView) itemView.findViewById(R.id.namecomment);
this.txtTime = (TextView) itemView.findViewById(R.id.time);
this.txtComment = (TextView) itemView.findViewById(R.id.comment);
this.setting = (ImageButton) itemView.findViewById(R.id.settingcom);
}
示例13: updateSessionInfo
import com.facebook.login.widget.ProfilePictureView; //导入依赖的package包/类
private void updateSessionInfo() {
// GraphRequest meRequest = GraphRequest.newMeRequest(AccessToken.getCurrentAccessToken(), new GraphRequest.GraphJSONObjectCallback() {
// @Override
// public void onCompleted(JSONObject object, GraphResponse response) {
//
// }
// });
// Bundle parameters = new Bundle();
// parameters.putString(FIELDS_PARAM, "id,name,link");
// meRequest.setParameters(parameters);
// meRequest.executeAsync();
Profile profile = Profile.getCurrentProfile();
if (profile != null) {
findViewById(R.id.activity_facebook_information_container).setVisibility(View.VISIBLE);
findViewById(R.id.activity_facebook_login_button).setVisibility(View.GONE);
ProfilePictureView profilePictureView = (ProfilePictureView) findViewById(R.id.activity_facebook_profile_picture);
profilePictureView.setProfileId(profile.getId());
TextView informationTextView = (TextView) findViewById(R.id.activity_facebook_information);
StringBuilder infoBuilder = new StringBuilder()
.append("ID: ").append(profile.getId()).append("\n\n")
.append("Username: ").append(profile.getName()).append("\n\n")
.append("Full name: ").append(profile.getName()).append("\n\n")
.append("Composed Name: ").append(
TextUtils.join(" ",
new String[]{
profile.getFirstName(),
profile.getMiddleName(),
profile.getLastName()}))
.append("\n\n");
informationTextView.setText(infoBuilder.toString());
} else {
findViewById(R.id.activity_facebook_information_container).setVisibility(View.GONE);
findViewById(R.id.activity_facebook_login_button).setVisibility(View.VISIBLE);
}
}
示例14: onCreateView
import com.facebook.login.widget.ProfilePictureView; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
final View view = inflater.inflate(R.layout.fb_page_info, container, false);
Intent intent = getActivity().getIntent();
String pageId = intent.getStringExtra("pageId");
final String pageName = intent.getStringExtra("pageName");
pagePicture = (ProfilePictureView) view.findViewById(R.id.pagePicture);
pageName_tv = (TextView)view.findViewById(R.id.pageName);
pagePicture.setProfileId(pageId);
pageName_tv.setText(pageName);
pageAbout(pageId);
return view;
}
示例15: onCreate
import com.facebook.login.widget.ProfilePictureView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
FacebookSdk.sdkInitialize(this.getApplicationContext());
callbackManager = CallbackManager.Factory.create();
LoginManager.getInstance().registerCallback(callbackManager, new FacebookCallback<LoginResult>() {
@Override
public void onSuccess(LoginResult loginResult) {
updateUI();
}
@Override
public void onCancel() {
updateUI();
}
@Override
public void onError(FacebookException e) {
updateUI();
}
});
setContentView(R.layout.activity_laun);
userName = (TextView) findViewById(R.id.user_name);
profilePicture = (ProfilePictureView) findViewById(R.id.profile_picture);
profileTracker = new ProfileTracker() {
@Override
protected void onCurrentProfileChanged(Profile profile, Profile profile1) {
updateUI();
}
};
mainMenu = (Button) findViewById(R.id.main_menu);
mainMenu.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View V){
profile = Profile.getCurrentProfile();
MemberStatic.setFbID(profile.getId());
new SimpleTask().execute("http://203.151.92.179:8080/fblogin?name="+profile.getFirstName() + "%20" + profile.getLastName() +"&fb-code="+profile.getId());
}
});
}