Android Open Source - HNdroid Comment






From Project

Back to project page HNdroid.

License

The source code is released under:

This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a co...

If you think the Android project HNdroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.gluegadget.hndroid;
//w w w.  j av  a  2  s.c  om
public class Comment {
  private String title;
  private String author;
  private String replyToUrl; 
  private String upVoteUrl;
  private Integer padding;

  public Comment(String _title, String _author, Integer _padding, String _replyToUrl, String _upVoteUrl) {
    title = _title;
    author = _author;
    padding = _padding;
    
    if (_replyToUrl.length() > 1)
      replyToUrl = "http://news.ycombinator.com/" + _replyToUrl.replace("&amp", "&");
    else
      replyToUrl = _replyToUrl;
    
    if (_upVoteUrl.length() > 1)
      upVoteUrl = "http://news.ycombinator.com/" + _upVoteUrl.replace("&amp", "&");
    else
      upVoteUrl = _upVoteUrl;
  }

  public Comment(String _title) {
    this(_title, "", 0, "", "");
  }
  
  public Integer getPadding() {
    return padding;
  }

  public String getTitle() {
    return title;
  }

  public String getAuthor() {
    return author;
  }
  
  public String getReplyToUrl() {
    return replyToUrl;
  }
  
  public String getUpVoteUrl() {
    return upVoteUrl;
  }

  @Override
  public String toString() {
    return author + ": " + title;
  }
}




Java Source Code List

com.gluegadget.hndroid.CommentDialog.java
com.gluegadget.hndroid.Comment.java
com.gluegadget.hndroid.CommentsAdapter.java
com.gluegadget.hndroid.Comments.java
com.gluegadget.hndroid.KarmaWidgetConfigurationActivity.java
com.gluegadget.hndroid.KarmaWidget.java
com.gluegadget.hndroid.LoginDialog.java
com.gluegadget.hndroid.Main.java
com.gluegadget.hndroid.NewsAdapter.java
com.gluegadget.hndroid.News.java
com.gluegadget.hndroid.Preferences.java
com.gluegadget.hndroid.Submissions.java