public void onClickCancel(View v) { hideKeyboard(); textNickName.setText(loggedUser.getNickName()); textEmail.setText(loggedUser.getUsername()); cancelButton.requestFocus(); RelativeLayout myLayout = (RelativeLayout) findViewById(R.id.activity_user_profile_root); myLayout.requestFocus(); cancelButton.setVisibility(View.GONE); }
/** Use user data in GUI */ private void useUserData() { String photo = loggedUser.getPhotoLarge(); if (photo == null) { photo = loggedUser.getPhoto(); } if (photo != null) { // Set views if (loggedUser != null) { imageLoader.DisplayImage(photo, imageProfilePhoto, R.drawable.default_avatar25, 400); class LoadPhotoThread implements Runnable { public Activity activity; public RelativeLayout layout; public String url; @Override public void run() { Bitmap b = imageLoader.getBitmap(url); if (b != null) { final Bitmap background = ImageLoader.FastBlur(b, 4); b.recycle(); activity.runOnUiThread( new Runnable() { @Override public void run() { if (background != null) { layout.setBackgroundDrawable(new BitmapDrawable(background)); } } }); } } } } title.setText(getResources().getString(R.string.settings)); textNickName.setText(loggedUser.getNickName()); textEmail.setText(loggedUser.getUsername()); displayCategory(); displaySkill(); } }