Creating fab share but it cant resolve method toLowerCase(). *dataLaundry is my model
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view){
// Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
// .setAction("Action", null).show();
Intent i = new Intent(Intent.ACTION_SEND);
i.setType("text/plain");
String shareSubject = String.valueOf(dataLaundry.getNama());
String shareBody = String.valueOf(dataLaundry.getAlamat());
i.putExtra(Intent.EXTRA_SUBJECT, "Laundrize - " + shareSubject);
i.putExtra(Intent.EXTRA_TEXT, shareSubject + "\n" + shareBody + "\n\n" +
"http:/maps.google.com/?q="
+ detail_alamat.toLowerCase().replaceAll(" ", "+"));
startActivity(Intent.createChooser(i, "Share via"));
}
});
try this
detail_alamat.getText().toString().toLowerCase()
because toLowerCase() is method of java.lang.String it can not apply direct to your detail_alamat(idtext)