Пример #1
0
        @Override
        public boolean onTouch(View v, MotionEvent event) {
          if (event.getAction() == MotionEvent.ACTION_DOWN) {
            Quote quote = quoteView.getQuote();

            if (null != quote) {
              Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);
              sharingIntent.setType("text/plain");
              // sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, quote.getText());
              sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, quote.getShareText());
              startActivity(Intent.createChooser(sharingIntent, "Share via"));
            }
          }

          // SystemUIHider
          if (AUTO_HIDE) {
            delayedHide(AUTO_HIDE_DELAY_MILLIS);
          }

          return false;
        }
Пример #2
0
 /** load the next quote and display it */
 protected void loadPreviousQuote() {
   Log.d(LOG_TAG, "load previous quote into view");
   quoteView.show(quoteManager.previous());
 }
Пример #3
0
 /** load the next quote and display it */
 protected void loadNextQuote() {
   Log.d(LOG_TAG, "load next quote into view");
   quoteView.show(quoteManager.next());
 }