|
|
|
@ -27,12 +27,13 @@ public class PearsonFragment extends Fragment implements View.OnClickListener {
|
|
|
|
|
public LinearLayout userProductLine,usernameLine, userSexline, userCityLine, userPayLine, userSettingLine, userGeneralLine;
|
|
|
|
|
public Button button;
|
|
|
|
|
public String username;
|
|
|
|
|
IndexActivity indexActivity;
|
|
|
|
|
Bundle bundle;
|
|
|
|
|
@Nullable
|
|
|
|
|
@Override
|
|
|
|
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
|
|
|
|
View view = LayoutInflater.from(getActivity()).inflate(R.layout.content_user, container, false);
|
|
|
|
|
init(view);
|
|
|
|
|
|
|
|
|
|
return view;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -73,7 +74,7 @@ public class PearsonFragment extends Fragment implements View.OnClickListener {
|
|
|
|
|
* 组件赋值
|
|
|
|
|
*/
|
|
|
|
|
private void setData() {
|
|
|
|
|
Bundle bundle = getArguments();
|
|
|
|
|
bundle = getArguments();
|
|
|
|
|
usernameText.setText(String.format("用户名:%s", bundle.getString("username")));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -85,11 +86,12 @@ public class PearsonFragment extends Fragment implements View.OnClickListener {
|
|
|
|
|
Intent intent2 = new Intent(getActivity(), GoodsActivity.class);
|
|
|
|
|
startActivity(intent2);
|
|
|
|
|
break;
|
|
|
|
|
// case R.id.user_setting:
|
|
|
|
|
// Intent intent3 = new Intent(getActivity(), UserMessageActivity.class);
|
|
|
|
|
// intent3.putExtra("username",username);
|
|
|
|
|
// startActivity(intent3);
|
|
|
|
|
// break;
|
|
|
|
|
case R.id.user_setting:
|
|
|
|
|
Intent intent3 = new Intent(getActivity(), UserMessageActivity.class);
|
|
|
|
|
// Bundle bundle = getArguments();
|
|
|
|
|
intent3.putExtra("username",bundle.getString("username"));
|
|
|
|
|
startActivity(intent3);
|
|
|
|
|
break;
|
|
|
|
|
case R.id.exit:
|
|
|
|
|
Intent intent4 = new Intent(getActivity(), MainActivity.class);
|
|
|
|
|
startActivity(intent4);
|
|
|
|
|