Advertisement
Guest User

Untitled

a guest
Apr 28th, 2011
338
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. private void showPreviewDialog() {
  2. Dialog dialog = new Dialog(DownloadActivity.this, android.R.style.Theme_Dialog);
  3. Context mContext = getApplicationContext();
  4. LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(LAYOUT_INFLATER_SERVICE);
  5. View layout = inflater.inflate(R.layout.preview , (ViewGroup) findViewById(R.id.preview));
  6. TextView mBootName = (TextView) layout.findViewById(R.id.preview_boot_name);
  7. mBootName.setText(getNAME());
  8. TextView mDescriptionText = (TextView) layout.findViewById(R.id.preview_description_title);
  9. mDescriptionText.setText(getDESCRIPTION());
  10. Button mPreviewButton = (Button) layout.findViewById(R.id.button_preview);
  11. mPreviewButton.setOnClickListener(new OnClickListener(){
  12. public void onClick(View v) {
  13.  
  14. }
  15. });
  16. Button mDownloadButton = (Button) layout.findViewById(R.id.button_download);
  17. mDownloadButton.setOnClickListener(new OnClickListener(){
  18. public void onClick(View v) {
  19. startDownload();
  20. }
  21. });
  22. dialog.setContentView(R.layout.preview);
  23. dialog.show();
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement