Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Task #616215 » MineFragement.txt

子琛 郝, 2016-11-29 02:48 AM

 
package com.example.administrator.missphoto;

import android.app.Fragment;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ImageButton;
import android.widget.ListView;


public class MineFragment extends Fragment {
@Nullable
private Context context;
private View view;
private ImageButton btn_mine_qq;
private ImageButton btn_mine_weibo;
private ImageButton btn_mine_phone;

public void setContext(Context context) {
this.context = context;
}

@Override
public Context getContext() {
return context;
}


@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

view = inflater.inflate(R.layout.layout_mine, container, false);
return view;
}

@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
btn_mine_qq=(ImageButton)view.findViewById(R.id.btn_mine_qq);
btn_mine_weibo=(ImageButton)view.findViewById(R.id.btn_mine_weibo);
btn_mine_phone=(ImageButton)view.findViewById(R.id.btn_mine_phone);
btn_mine_phone.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent();
intent.setClass(getActivity(), ZhuceActivity.class);
startActivity(intent);
}
});
btn_mine_qq.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent();
intent.setClass(getActivity(), ZhuceActivity.class);
startActivity(intent);
}
});
btn_mine_weibo.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent();
intent.setClass(getActivity(), ZhuceActivity.class);
startActivity(intent);
}
});

}
}
(3-3/4)