Android Open Source - TVRDecoder Bullet List Builder






From Project

Back to project page TVRDecoder.

License

The source code is released under:

Apache License

If you think the Android project TVRDecoder 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 se.blunden.tvrdecoder;
/*from   w w  w  .j  av a 2  s  .  c  o  m*/
import java.util.ArrayList;

import android.text.Html;
import android.text.Spanned;

public class BulletListBuilder {

    private static final String SPACE = " ";
    private static final String BULLET_SYMBOL = "&#8226";
    private static final String EOL = System.getProperty("line.separator");
//    private static final String TAB = "\t";

    private BulletListBuilder() {

    }

    public static String getBulletList(String header, ArrayList<String >items) {
        StringBuilder listBuilder = new StringBuilder();
        if (header != null && !header.isEmpty()) {
            listBuilder.append(header + EOL + EOL);
        }
        if (items != null && items.size() != 0) {
            for (String item : items) {
                Spanned formattedItem = Html.fromHtml(BULLET_SYMBOL + SPACE + item);
                //listBuilder.append(TAB + formattedItem + EOL);
                listBuilder.append(formattedItem + EOL);
            }
        }
        return listBuilder.toString();
    }
}




Java Source Code List

se.blunden.tvrdecoder.BulletListBuilder.java
se.blunden.tvrdecoder.Decoder.java
se.blunden.tvrdecoder.MainActivity.java
se.blunden.tvrdecoder.ResultCardView.java
se.blunden.tvrdecoder.SwipeDismissTouchListener.java