Пример #1
0
 /** unsubscribe to thread. */
 public void unsubscribe() {
   try {
     MySoup.pressLink(
         "userhistory.php?action=thread_subscribe&topicid="
             + getTopicId().intValue()
             + "&auth="
             + MySoup.getAuthKey());
     System.out.println("Unsubscribed");
   } catch (Exception e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   }
 }
Пример #2
0
 @Override
 protected Boolean doInBackground(Void... params) {
   boolean toReturn;
   try {
     forumSections = MySoup.loadForumSections();
     toReturn = forumSections.getStatus();
   } catch (Exception e) {
     e.printStackTrace();
     toReturn = false;
   }
   return toReturn;
 }
Пример #3
0
 @Override
 public Spannable getStyle(CharSequence param, CharSequence text) {
   SpannableString styled = new SpannableString(text);
   String url;
   if (param != null && param.length() != 0) {
     url = param.toString();
   } else {
     url = text.toString();
   }
   if (!url.startsWith("http")) {
     url = MySoup.getSite() + url;
   }
   styled.setSpan(new URLSpan(url), 0, styled.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
   return styled;
 }