Java 类com.facebook.login.widget.ProfilePictureView 实例源码

项目:make-me-smile    文件:CustomViewHolder.java   
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);
}
项目:MobileProjectManagement    文件:AddProject.java   
@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);
        }

    });

}
项目:PlaySoduko    文件:HomeActivity.java   
/**
 * 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);
}
项目:journal    文件:PageAdapter.java   
@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;
}
项目:journal    文件:FbUserFeedCommentAdapter.java   
@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;
}
项目:Walk-Ranger    文件:ScarActivity.java   
@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());
}
项目:Walk-Ranger    文件:BgroupActivity.java   
@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();
}
项目:Walk-Ranger    文件:UserActivity.java   
@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();

}
项目:Walk-Ranger    文件:GroupActivity.java   
@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();
}
项目:Walk-Ranger    文件:LeagroupActivity.java   
@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();
}
项目:Walk-Ranger    文件:BoardActivity.java   
@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());
}
项目:make-me-smile    文件:CommentHolder.java   
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);
}
项目:OAuth    文件:FacebookActivity.java   
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);
        }

    }
项目:journal    文件:PageAdapter.java   
@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;
}
项目:journal    文件:FbUserFeedCommentAdapter.java   
@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;
}
项目:journal    文件:FbPageInfoFragment.java   
@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;
}
项目:Walk-Ranger    文件:LaunActivity.java   
@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());


        }
    });
}
项目:Walk-Ranger    文件:MainActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    Intent intent =getIntent();
    cc = intent.getStringExtra("step");
    cp1 = (ProgressBar)findViewById(R.id.progressBar);
    cp2 = (ProgressBar)findViewById(R.id.progressBark);
    cp3 = (ProgressBar)findViewById(R.id.progressBarm);

    count1 = (TextView) findViewById(R.id.count1);
    count2 = (TextView) findViewById(R.id.count2);
    count3 = (TextView) findViewById(R.id.count3);
  //  Bundle extra = getIntent().getExtras();
  //  String faceid = extra.getString("ID");


    profile = Profile.getCurrentProfile();
    //new SimpleTaskL().execute("http://203.151.92.179:8080/fblogin?name=" + profile.getName() + "&fb-code=" + profile.getId());
    new SimpleTask().execute("http://203.151.92.179:8080/getuserprofile?id=" + MemberStatic.getFbID());
    //while(user.getStepCount() == 0 );

    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);

    ((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);



    sensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);

    //count.setText(String.valueOf(user.getStepCount()));


}
项目:TFG    文件:PantallaPerfil.java   
/**
 * Metodo llamado cuando la actividad es creada
 * @param savedInstanceState Estado anterior de la actividad guardado
 */
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    //Establece la interfaz de usuario para esta Activity
    setContentView(R.layout.activity_pantalla_perfil);

    //Creamos el typeface para asignar la fuente a los textviews de la actividad
    Typeface fuente = Typeface.createFromAsset(getAssets(), "font/Square.ttf");

    //Asignamos las distintas variables a los elementos de la interfaz de usuario
    foto = (ProfilePictureView)findViewById(R.id.fotoperfil);
    nombre = (TextView) findViewById(R.id.nombre);
    nivel = (TextView)findViewById(R.id.nivel);
    mejorJugada = (TextView)findViewById(R.id.mejorpuntuacion);
    partidas = (TextView)findViewById(R.id.partidas);
    victorias = (TextView)findViewById(R.id.partidas_ganadas);
    fecha_registro = (TextView) findViewById(R.id.fecha_registro);
    fecha_ultima = (TextView)findViewById(R.id.fecha_ultima);
    reto1partida = (TableRow)findViewById(R.id.reto1partida);
    retoultimapartida = (TableRow)findViewById(R.id.retoultimajugada);
    reto1jugada = (TableRow)findViewById(R.id.reto1jugada);
    reto1minuto = (TableRow)findViewById(R.id.reto1minuto);
    retoamateur = (TableRow)findViewById(R.id.retoamateur);
    retoprofesioal = (TableRow)findViewById(R.id.retoprofesional);
    retoexperto = (TableRow)findViewById(R.id.retoexperto);

    //Cambiamos la fuente de los elementos de la interfaz de usuario
    nivel.setTypeface(fuente);
    mejorJugada.setTypeface(fuente);
    partidas.setTypeface(fuente);
    victorias.setTypeface(fuente);
    fecha_registro.setTypeface(fuente);
    fecha_ultima.setTypeface(fuente);

    //Inicializamos la base de datos
    BD = new BDPerfilJugador(this);

    //Obtenemos todos los datos del perfil de la base de datos
    obtenerDatosPerfil(BD);

    //Obtenemos los datos referentes a Facebook
    ObtenerDatosFacebook();
}
项目:journal    文件:FbPageInfoFragment.java   
@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;
}