List of usage examples for android.widget ImageView setY
public void setY(float y)
From source file:com.scigames.slidereview.MenuActivity.java
private void displayProfile() { setContentView(R.layout.menu_page);//from ww w .ja v a2s. co m Log.d(TAG, "...setContentView"); //display name and profile info Resources res = getResources(); greets = (TextView) findViewById(R.id.student_name); greets.setText(String.format(res.getString(R.string.profile_name), firstNameIn, lastNameIn)); setTextViewFont(Museo700Regular, greets); Log.d(TAG, "...Profile Info"); reviewBtn = (Button) findViewById(R.id.btn_review); reviewBtn.setOnClickListener(mReview); setButtonFont(ExistenceLightOtf, reviewBtn); infoDialog = new AlertDialog.Builder(MenuActivity.this).create(); infoDialog.setTitle("Debug Info"); infoDialog.setButton(RESULT_OK, "OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { // Write your code here to execute after dialog closed } }); if (debug) { // infoDialog.setTitle("studentId"); // infoDialog.setMessage(studentIdIn); // infoDialog.show(); } task.setOnResultsListener(this); task.cancel(true); task = new SciGamesHttpPoster(MenuActivity.this, baseDbURL + "/pull/return_profile.php"); task.setOnResultsListener(MenuActivity.this); //download photo ImageView profilePhoto = (ImageView) findViewById(R.id.profile_image); profilePhoto.setTag(photoUrl); profilePhoto.setScaleX(1.4f); profilePhoto.setScaleY(1.4f); profilePhoto.setX(120f); profilePhoto.setY(123f); photoTask.cancel(true); photoTask = new DownloadProfilePhoto(MenuActivity.this, photoUrl); //AsyncTask<ImageView, Void, Bitmap> pPhoto = photoTask.execute(profilePhoto); }
From source file:com.scigames.slidegame.MenuActivity.java
private void displayProfile() { setContentView(R.layout.menu_page);/*from w ww . ja v a2s. c o m*/ Log.d(TAG, "...setContentView"); //display name and profile info Resources res = getResources(); greets = (TextView) findViewById(R.id.student_name); greets.setText(String.format(res.getString(R.string.profile_name), firstNameIn, lastNameIn)); setTextViewFont(Museo700Regular, greets); Log.d(TAG, "...Profile Info"); playBtn = (Button) findViewById(R.id.btn_play); playBtn.setOnClickListener(mPlay); setButtonFont(ExistenceLightOtf, playBtn); infoDialog = new AlertDialog.Builder(MenuActivity.this).create(); infoDialog.setTitle("Debug Info"); infoDialog.setButton(RESULT_OK, "OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { // Write your code here to execute after dialog closed } }); if (debug) { // infoDialog.setTitle("studentId"); // infoDialog.setMessage(studentIdIn); // infoDialog.show(); } task.setOnResultsListener(this); task.cancel(true); task = new SciGamesHttpPoster(MenuActivity.this, baseDbURL + "/pull/return_profile.php"); task.setOnResultsListener(MenuActivity.this); //download photo ImageView profilePhoto = (ImageView) findViewById(R.id.profile_image); profilePhoto.setTag(photoUrl); profilePhoto.setScaleX(1.4f); profilePhoto.setScaleY(1.4f); profilePhoto.setX(120f); profilePhoto.setY(123f); photoTask.cancel(true); photoTask = new DownloadProfilePhoto(MenuActivity.this, photoUrl); //AsyncTask<ImageView, Void, Bitmap> pPhoto = photoTask.execute(profilePhoto); }
From source file:com.scigames.registration.ProfileActivity.java
public void onResultsSucceeded(String[] serverResponseStrings, JSONObject serverResponseJSON) throws JSONException { //for debugging: // alertDialog.setTitle("incoming:"); // alertDialog.setMessage("active: " + serverResponseStrings[2] + // " mass: " + serverResponseStrings[5] + // " firstName: " + serverResponseStrings[2] + // " lastName: " + serverResponseStrings[3] + // " pw: " + serverResponseStrings[8] + // " classId: " + serverResponseStrings[14] + // " rfid: " + serverResponseStrings[9] // ); // alertDialog.show(); //download photo ImageView profilePhoto = (ImageView) findViewById(R.id.imageView1); profilePhoto.setTag(photoUrl);//w ww.j a v a 2s . co m profilePhoto.setScaleX(1.4f); profilePhoto.setScaleY(1.4f); profilePhoto.setX(120f); profilePhoto.setY(123f); photoTask.cancel(true); photoTask = new DownloadProfilePhoto(ProfileActivity.this, photoUrl); //AsyncTask<ImageView, Void, Bitmap> pPhoto = photoTask.execute(profilePhoto); //update all text fields Resources res = getResources(); //TextView greets = (TextView)findViewById(R.id.greeting); greets.setText(String.format(res.getString(R.string.profile_name), serverResponseStrings[2], serverResponseStrings[3])); //TextView fname = (TextView)findViewById(R.id.first_name); // fname.setText(String.format(res.getString(R.string.profile_first_name), serverResponseStrings[2])); // // //TextView lname = (TextView)findViewById(R.id.last_name); // lname.setText(String.format(res.getString(R.string.profile_last_name), serverResponseStrings[3])); //TextView school = (TextView)findViewById(R.id.school_name); //schoolname.setText(String.format(res.getString(R.string.profile_school_name), serverResponseStrings[14])); //TextView teacher = (TextView)findViewById(R.id.teacher_name); teachername.setText(String.format(res.getString(R.string.profile_teacher_name), serverResponseStrings[13])); //TextView classid = (TextView)findViewById(R.id.class_id); classid.setText(String.format(res.getString(R.string.profile_classid), serverResponseStrings[14])); // TextView mmass = (TextView)findViewById(R.id.mass); classname.setText(String.format(res.getString(R.string.profile_classname), serverResponseStrings[12])); //TextView mpass = (TextView)findViewById(R.id.password); mpass.setText(String.format(res.getString(R.string.profile_password), serverResponseStrings[8])); // TextView mRfid = (TextView)findViewById(R.id.rfid); // mRfid.setText(String.format(res.getString(R.string.profile_rfid), serverResponseStrings[9])); setTextViewFont(Museo500Regular, teachername, classid, mpass, classname); setTextViewFont(Museo700Regular, greets); Log.d(TAG, "...Profile Info"); }