Пример #1
0
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.menus);

    String name = "Test";
    String hname = "TestH";
    String iday = "39";

    String simpleinfo = name + "���덈뀞�섏꽭��n" + hname + " 蹂묒썝�낅땲��\n" + iday + "�쇱㎏ �낆썝以묒씠��땲��";

    // TextView���쒖떆�댁쨪 �댁슜
    TextView tv = (TextView) findViewById(R.id.simpleinfo);
    tv.setText(simpleinfo);

    findViewById(R.id.mystatbtn).setOnClickListener(myClickListener);
    findViewById(R.id.noticebtn).setOnClickListener(myClickListener);
    findViewById(R.id.requestbtn).setOnClickListener(myClickListener);
    findViewById(R.id.hospitalinfobtn).setOnClickListener(myClickListener);
    findViewById(R.id.qrreadbtn).setOnClickListener(myClickListener);
    findViewById(R.id.parentcallbtn).setOnClickListener(myClickListener);
    findViewById(R.id.emergencybtn).setOnClickListener(myClickListener);
  }
 @Override
 protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
   if (requestCode == FILECHOOSER_RESULTCODE) { // found this from StackOverflow
     if (null == mUploadMessage) return;
     Uri result = intent == null || resultCode != RESULT_OK ? null : intent.getData();
     mUploadMessage.onReceiveValue(result);
     mUploadMessage = null;
   } else {
     // -----------I wrote this code below this line----------------------------------
     jpegData = intent.getExtras().getByteArray("image");
     Bitmap img = BitmapFactory.decodeByteArray(jpegData, 0, jpegData.length);
     Drawable d = new BitmapDrawable(img);
     profilePicture.setBackground(d);
   }
 }
Пример #3
0
    protected void onPostExecute(String[] result) {
      // ("Download complete: " + result + "\nComplete");

      if (result.length < 2) {
        text1.setText("Error: " + result[0]);

      } else {
        // text1.setText("Starting download " + result[1] + "... " + result[0]);

        doDownload(result[0], result[1]);

        finish();

        Toast.makeText(mContext.get(), "Downloading " + result[1] + "...", Toast.LENGTH_LONG)
            .show();
      }
    }
Пример #4
0
 protected void onProgressUpdate(String... progress) {
   // setProgressPercent(progress[0]);
   text1.setText(progress[0]);
 }