/Android_Quote_Sharing_App

App to share the code to all installed apps in your device

Primary LanguageJavaMIT LicenseMIT

Android_Quote_Sharing_App

App to share the code to all installed apps in your device

This topic is a part of My Complete Andorid Course

Code

MainActivity.java

TextView tvQuote;
Button buttonShare;

//hide the toolbar
getSupportActionBar().hide();

tvQuote = findViewById(R.id.tvQuote);
buttonShare = findViewById(R.id.buttonShare);

        buttonShare.setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {

                        String quoteToShare = tvQuote.getText().toString();

                        Intent intent = new Intent();

                        intent.setAction(Intent.ACTION_SEND);
                        intent.setType("text/plain");
                        intent.putExtra(Intent.EXTRA_TEXT, quoteToShare);

                        startActivity(intent);
                    }
                }
        );

App Highlight

Quote Share Code Quote Share App1 Quote Share App2