2016-01-11 18 views

回答

1

對於FAB教程,請從AndroidHive的教程 http://www.androidhive.info/2015/12/android-material-design-floating-action-button/

結賬時發送電子郵件給開發者。

FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab); 
     fab.setOnClickListener(new View.OnClickListener() { 
      @Override 
      public void onClick(View view) { 
       Intent Email = new Intent(Intent.ACTION_SEND); 
      Email.setType("text/email"); 
      Email.putExtra(Intent.EXTRA_EMAIL, 
        new String[]{"[email protected]"}); //developer 's email 
      Email.putExtra(Intent.EXTRA_SUBJECT, 
        "Add your Subject"); // Email 's Subject 
      Email.putExtra(Intent.EXTRA_TEXT, "Dear Developer Name," + ""); //Email 's Greeting text 
      startActivity(Intent.createChooser(Email, "Send Feedback:")); 
      } 
     }); 
+0

這將工作,謝謝 – fumes007

相關問題