gt:                 if ((potentialNotes != null) && (!potentialNotes.equals(""))) {
context: package it.instruman.treasurecruisedatabase;
  
  import android.app.Dialog;
  import android.content.Context;
  import android.content.Intent;
  import android.database.sqlite.SQLiteDatabase;
  import android.graphics.Color;
  import android.graphics.PorterDuff;
  import android.graphics.Typeface;
  import android.graphics.drawable.ColorDrawable;
  import android.graphics.drawable.Drawable;
  import android.net.Uri;
  import android.preference.PreferenceManager;
  import android.support.annotation.NonNull;
  import android.support.v4.graphics.drawable.DrawableCompat;
  import android.support.v7.widget.SearchView;
  import android.util.DisplayMetrics;
  import android.util.TypedValue;
  import android.view.Gravity;
  import android.view.View;
  import android.view.ViewGroup;
  import android.view.WindowManager;
  import android.widget.HorizontalScrollView;
  import android.widget.ImageButton;
  import android.widget.ImageView;
  import android.widget.LinearLayout;
  import android.widget.ProgressBar;
  import android.widget.TabHost;
  import android.widget.TextView;
  
  import com.bumptech.glide.Glide;
  import com.bumptech.glide.load.engine.DiskCacheStrategy;
  
  import java.math.RoundingMode;
  import java.text.DecimalFormat;
  import java.util.ArrayList;
  import java.util.Calendar;
  import java.util.LinkedHashMap;
  import java.util.List;
  import java.util.Map;
  import java.util.TreeMap;
  import java.util.regex.Matcher;
  import java.util.regex.Pattern;
  
  import it.instruman.treasurecruisedatabase.nakama.network.BitmapComposer;
  import it.instruman.treasurecruisedatabase.nakama.network.NNHelper;
  import it.instruman.treasurecruisedatabase.nakama.network.QueryTeamsByStageTask;
  import it.instruman.treasurecruisedatabase.nakama.network.QueryTeamsTask;
  import it.instruman.treasurecruisedatabase.nakama.network.Team;
  import it.instruman.treasurecruisedatabase.nakama.network.Unit;
  
  /**
   * Created by infan on 19/02/2018.
   */
  
  public class CharacterDetailsDialog extends Dialog {
      Context mContext;
      int charId;
      private ProgressBar progressBar;
      ImageButton searchButton;
      SearchView searchView;
      private int mThemeResId;
  
      public static final int thumbnail_width = 96;
      public static final int thumbnail_height = 96;
  
      public static int getResIdFromAttribute(final Context context, final int attr) {
          if (attr == 0)
              return 0;
          final TypedValue typedvalueattr = new TypedValue();
          context.getTheme().resolveAttribute(attr, typedvalueattr, true);
          return typedvalueattr.resourceId;
      }
  
      public String convertID(Integer ID) {
          if ((ID == 574) || (ID == 575)) {
              return ("00" + ID.toString());
          }
          if (ID < 10) return ("000" + ID.toString());
          else if (ID < 100) return ("00" + ID.toString());
          else if (ID < 1000) return ("0" + ID.toString());
          else return ID.toString();
      }
  
      private String replaceBr(String input) {
          String output = input.replace(" <br> ", System.getProperty("line.separator"));
          output = output.replace("<br> ", System.getProperty("line.separator"));
          output = output.replace("<br>", System.getProperty("line.separator"));
          return output;
      }
  
      public int dpToPx(int dp) {
          DisplayMetrics displayMetrics = mContext.getResources().getDisplayMetrics();
          return Math.round(dp * (displayMetrics.xdpi / DisplayMetrics.DENSITY_DEFAULT));
      }
  
      public interface LaunchDialogInterface {
          void launch(int charId);
      }
  
      private LaunchDialogInterface mLaunchDialogInterface;
  
      public void setLaunchDialogInterface(LaunchDialogInterface launchDialogInterface) {
          mLaunchDialogInterface = launchDialogInterface;
      }
  
      public CharacterDetailsDialog(@NonNull Context context, int themeResId, int id) {
          super(context, themeResId);
  
          setContentView(R.layout.dialog_main);//setContentView(R.layout.character_info);
  
          mThemeResId = themeResId;
          mContext = context;
          charId = id;
          progressBar = findViewById(R.id.progressBar_cyclic);
  
          boolean daynightTheme = PreferenceManager.getDefaultSharedPreferences(context).getBoolean(context.getString(R.string.pref_daynight_theme), false);
          if (daynightTheme) {
              int hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);
              LinearLayout mainContent = findViewById(R.id.charInfoMainContent);
              /*if((8<=hour)&&(hour<20))
              {
                  //DAYLIGHT
                  KenBurnsView charInfoBgImg = (KenBurnsView)findViewById(R.id.charInfoBgImg);
                  charInfoBgImg.setBackgroundDrawable(context.getResources().getDrawable(R.drawable.ic_sunny_sky));
                  RandomTransitionGenerator generator = new RandomTransitionGenerator(15000, new LinearInterpolator());
                  charInfoBgImg.setTransitionGenerator(generator);
                  charInfoBgImg.resume();
              } else {
                  //NIGHT
                  animateColor(mainContent, anim_charlist, "#333333", "#504e3c");
              }*/
          }
  
          searchButton = findViewById(R.id.nnteam_searchBtn);
          searchView = findViewById(R.id.nnteam_searchView);
  
          final TabHost tabs = findViewById(R.id.tabs_host);
          tabs.setup();
  
          TabHost.TabSpec main_info = tabs.newTabSpec("MAIN_INFO");
          main_info.setIndicator(context.getString(R.string.tab_maininfo));
          main_info.setContent(R.id.tab_maininfo);
          tabs.addTab(main_info);
  
          TabHost.TabSpec abilities = tabs.newTabSpec("ABILITIES");
          abilities.setIndicator(context.getString(R.string.tab_abilities));
          abilities.setContent(R.id.tab_abilities);
          tabs.addTab(abilities);
  
          TabHost.TabSpec limitbreak_tab = tabs.newTabSpec("LIMIT_BREAK");
          limitbreak_tab.setIndicator(context.getString(R.string.tab_limitbreak));
          limitbreak_tab.setContent(R.id.tab_limitbreak);
          tabs.addTab(limitbreak_tab);
          tabs.getTabWidget().getChildTabViewAt(2).setVisibility(View.GONE);
  
          TabHost.TabSpec evolutions_tab = tabs.newTabSpec("EVOLUTIONS");
          evolutions_tab.setIndicator(context.getString(R.string.tab_evolutions));
          evolutions_tab.setContent(R.id.tab_evolutions);
          tabs.addTab(evolutions_tab);
          tabs.getTabWidget().getChildTabViewAt(3).setVisibility(View.GONE);
  
          TabHost.TabSpec drops_tab = tabs.newTabSpec("DROPS");
          drops_tab.setIndicator(context.getString(R.string.tab_drops));
          drops_tab.setContent(R.id.tab_drops);
          tabs.addTab(drops_tab);
          tabs.getTabWidget().getChildTabViewAt(4).setVisibility(View.GONE);
  
          TabHost.TabSpec manuals_tab = tabs.newTabSpec("MANUALS");
          manuals_tab.setIndicator(context.getString(R.string.tab_manuals));
          manuals_tab.setContent(R.id.tab_manuals);
          tabs.addTab(manuals_tab);
          tabs.getTabWidget().getChildTabViewAt(5).setVisibility(View.GONE);
  
          boolean isNNTeamsEnabled = PreferenceManager.getDefaultSharedPreferences(context).getBoolean(context.getString(R.string.prefShowNNIntegration), true);
          TabHost.TabSpec nnteams_tab = tabs.newTabSpec("NNTEAMS");
          nnteams_tab.setIndicator(context.getString(R.string.tab_nnteams));
          nnteams_tab.setContent(R.id.tab_nnteams);
          tabs.addTab(nnteams_tab);
          if (!isNNTeamsEnabled)
              tabs.getTabWidget().getChildTabViewAt(6).setVisibility(View.GONE);
  
          tabs.setCurrentTab(0);
  
          tabs.setOnTabChangedListener(tabChangeListener);
  
          for (int i = 0; i < tabs.getTabWidget().getChildCount(); i++) {
              TextView tv = tabs.getTabWidget().getChildAt(i).findViewById(android.R.id.title);
              tv.setTextColor(context.getResources().getColor(getResIdFromAttribute(context, R.attr.char_info_txt)));
          }
  
          TextView title = findViewById(R.id.titleText);
  
          // set the custom dialog components - text, image and button
          ImageView image = findViewById(R.id.char_img_big);
  
          Glide
                  .with(context)
                  .load("http://onepiece-treasurecruise.com/wp-content/uploads/c" + convertID(id) + ".png")
                  .into(image);
  
          setCanceledOnTouchOutside(true);
  
          //NOW WE SHOULD SET EVERYTHING (OUCH!)
          TextView class1 = findViewById(R.id.class1Text);
          TextView class2 = findViewById(R.id.class2Text);
          TextView type = findViewById(R.id.typeText);
          TextView stars = findViewById(R.id.starsText);
          TextView cost = findViewById(R.id.costText);
  
          TextView combo = findViewById(R.id.comboText);
          TextView slots = findViewById(R.id.slotsText);
          TextView maxlevel = findViewById(R.id.maxlevelText);
          TextView exptomax = findViewById(R.id.exptomaxText);
  
          TextView lvl1hp = findViewById(R.id.lvl1hpText);
          TextView lvl1atk = findViewById(R.id.lvl1atkText);
          TextView lvl1rcv = findViewById(R.id.lvl1rcvText);
  
          TextView maxhp = findViewById(R.id.lvlmaxhpText);
          TextView maxatk = findViewById(R.id.lvlmaxatkText);
          TextView maxrcv = findViewById(R.id.lvlmaxrcvText);
          TextView lvlmax = findViewById(R.id.lvlmaxtext);
  
          TextView lbhp = findViewById(R.id.lvllbhpText);
          TextView lbatk = findViewById(R.id.lvllbatkText);
          TextView lbrcv = findViewById(R.id.lvllbrcvText);
  
          HtmlTextView captability = findViewById(R.id.captabilityText);
          TextView captnotes = findViewById(R.id.capt_notes);
          TextView specname = findViewById(R.id.specnameText);
  
          DBHelper db = new DBHelper(context);
          SQLiteDatabase database = db.getReadableDatabase();
          CharacterInfo charInfo = DBHelper.getCharacterInfo(database, id);
          database.close();
          db.close();
  
          if (charInfo == null) return;
  
          title.setText(charInfo.getName());
          title.setTextColor(context.getResources().getColor(getResIdFromAttribute(context, R.attr.char_info_txt)));
  
          class1.setText(charInfo.getClass1());
          class2.setText(charInfo.getClass2());
  
          String ch_type = charInfo.getType();
          type.setText(ch_type);
          switch (ch_type.toLowerCase()) {
              case "str":
                  type.setBackgroundColor(context.getResources().getColor(R.color.str_bg));
                  type.setTextColor(context.getResources().getColor(R.color.str_txt));
                  break;
              case "dex":
                  type.setBackgroundColor(context.getResources().getColor(R.color.dex_bg));
                  type.setTextColor(context.getResources().getColor(R.color.dex_txt));
                  break;
              case "qck":
                  type.setBackgroundColor(context.getResources().getColor(R.color.qck_bg));
                  type.setTextColor(context.getResources().getColor(R.color.qck_txt));
                  break;
              case "psy":
                  type.setBackgroundColor(context.getResources().getColor(R.color.psy_bg));
                  type.setTextColor(context.getResources().getColor(R.color.psy_txt));
                  break;
              case "int":
                  type.setBackgroundColor(context.getResources().getColor(R.color.int_bg));
                  type.setTextColor(context.getResources().getColor(R.color.int_txt));
                  break;
          }
  
          Double ch_stars = charInfo.getStars();
          DecimalFormat df = new DecimalFormat("0");
          df.setRoundingMode(RoundingMode.DOWN);
          String stars_p = df.format(ch_stars);
  
          if (ch_stars == 5.5)
              stars.setText("5+");
          else if (ch_stars == 6.5)
              stars.setText("6+");
          else
              stars.setText(stars_p);
  
          switch (stars_p) {
              case "1":
              case "2":
                  stars.setBackgroundColor(context.getResources().getColor(R.color.bronze_bg));
                  stars.setTextColor(context.getResources().getColor(R.color.bronze_txt));
                  break;
              case "3":
                  stars.setBackgroundColor(context.getResources().getColor(R.color.silver_bg));
                  stars.setTextColor(context.getResources().getColor(R.color.silver_txt));
                  break;
              case "4":
              case "5":
                  stars.setBackgroundColor(context.getResources().getColor(R.color.gold_bg));
                  stars.setTextColor(context.getResources().getColor(R.color.gold_txt));
                  break;
              case "6":
                  stars.setBackgroundColor(context.getResources().getColor(R.color.red_bg));
                  stars.setTextColor(context.getResources().getColor(R.color.red_txt));
                  break;
          }
  
          cost.setText(charInfo.getCost().toString());
          combo.setText(charInfo.getCombo().toString());
          slots.setText(charInfo.getSockets().toString());
          maxlevel.setText(charInfo.getMaxLvl().toString());
          exptomax.setText(charInfo.getExpToMax().toString());
  
          lvl1hp.setText(charInfo.getLvl1HP().toString());
          lvl1atk.setText(charInfo.getLvl1ATK().toString());
          lvl1rcv.setText(charInfo.getLvl1RCV().toString());
          lvlmax.setText(charInfo.getMaxLvl().toString());
  
          maxhp.setText(charInfo.getMaxHP().toString());
          maxatk.setText(charInfo.getMaxATK().toString());
          maxrcv.setText(charInfo.getMaxRCV().toString());
  
          Limits charLimits = charInfo.getCharLimits();
          Potentials charPotentials = charInfo.getCharPotentials();
  
          int additionalHP = 0;
          int additionalATK = 0;
          int additionalRCV = 0;
          if (charLimits != null) {
              String pattern = "Boosts base %s by (\\d+)";
              Pattern atkP = Pattern.compile(String.format(pattern, "ATK"));
              Pattern hpP = Pattern.compile(String.format(pattern, "HP"));
              Pattern rcvP = Pattern.compile(String.format(pattern, "RCV"));
              for (String lE : charLimits.getLimitEntries()) {
                  try {
                      Matcher hpM = hpP.matcher(lE);
                      if (hpM.matches()) {
                          additionalHP += Integer.parseInt(hpM.group(1));
                          continue;
                      }
                      Matcher atkM = atkP.matcher(lE);
                      if (atkM.matches()) {
                          additionalATK += Integer.parseInt(atkM.group(1));
                          continue;
                      }
                      Matcher rcvM = rcvP.matcher(lE);
                      if (rcvM.matches())
                          additionalRCV += Integer.parseInt(rcvM.group(1));
                  } catch (NumberFormatException e) {
                      e.printStackTrace();
                  }
              }
          }
  
          if (additionalHP > 0)
              lbhp.setText(String.valueOf(charInfo.getMaxHP() + additionalHP));
          else
              lbhp.setText(R.string.noLbStatsIncrease);
          if (additionalATK > 0)
              lbatk.setText(String.valueOf(charInfo.getMaxATK() + additionalATK));
          else
              lbatk.setText(R.string.noLbStatsIncrease);
          if (additionalRCV > 0)
              lbrcv.setText(String.valueOf(charInfo.getMaxRCV() + additionalRCV));
          else
              lbrcv.setText(R.string.noLbStatsIncrease);
  
          captability.setText(charInfo.getCaptainDescription());
          String capt_notes = charInfo.getCaptainNotes();
          if (!capt_notes.equals("")) {
              capt_notes = replaceBr(capt_notes);
              captnotes.setText(context.getString(R.string.notes_text) + capt_notes);
              captnotes.setVisibility(View.VISIBLE);
          }
          List<CharacterSpecials> char_specials = charInfo.getSpecials();
          if (char_specials.size() > 0) {
              specname.setText(charInfo.getSpecialName());
              LinearLayout specials_container = findViewById(R.id.specials_container);
              for (CharacterSpecials special : char_specials) {
                  TextView special_description = new TextView(context);
                  special_description.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT));
                  special_description.setText(special.getSpecialDescription());
                  special_description.setTextColor(context.getResources().getColor(getResIdFromAttribute(context, R.attr.char_info_txt)));
                  specials_container.addView(special_description);
  
                  LinearLayout coold_layout = new LinearLayout(context);
                  coold_layout.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT));
  
                  TextView coold_title = new TextView(context);
                  LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);
                  params.setMargins(0, 0, dpToPx(4), 0);
                  coold_title.setLayoutParams(params);
                  coold_title.setText(context.getString(R.string.speccooldown));
                  coold_title.setTypeface(Typeface.DEFAULT, Typeface.BOLD);
                  coold_title.setBackgroundColor(context.getResources().getColor(getResIdFromAttribute(context, R.attr.char_info_header_bg)));
                  coold_title.setTextColor(context.getResources().getColor(getResIdFromAttribute(context, R.attr.char_info_header_txt)));
                  coold_title.setText(context.getString(R.string.speccooldown));
                  coold_layout.addView(coold_title);
  
                  TextView coold_content = new TextView(context);
                  coold_content.setLayoutParams(new LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.WRAP_CONTENT, 1));
                  Integer maxCD = special.getMaxCooldown();
                  Integer minCD = special.getMinCooldown();
  
                  String maxCDs = "?";
                  if ((maxCD != -1) && (maxCD != 0))
                      maxCDs = String.valueOf(maxCD);
  
                  String minCDs = "?";
                  if ((minCD != -1) && (minCD != 0))
                      minCDs = String.valueOf(minCD);
  
                  String coold_s = maxCDs + "/" + minCDs;
                  coold_content.setText(coold_s);
                  coold_content.setTextColor(context.getResources().getColor(getResIdFromAttribute(context, R.attr.char_info_txt)));
  
                  coold_layout.addView(coold_content);
  
                  String specialnotes = special.getSpecialNotes();
                  if (!specialnotes.equals("")) {
                      specialnotes = replaceBr(specialnotes);
                      TextView special_notes = new TextView(context);
                      special_notes.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT));
                      special_notes.setText(context.getString(R.string.notes_text) + specialnotes);
                      special_notes.setTextColor(context.getResources().getColor(getResIdFromAttribute(context, R.attr.char_info_header_txt)));
                      specials_container.addView(special_notes);
                  }
  
                  coold_layout.setPadding(2, 8, 2, 8);
  
                  specials_container.addView(coold_layout);
              }
          }
  
          String cwDesc = charInfo.getCrewmateDescription();
          String cwNotes = charInfo.getCrewmateNotes();
          if (cwDesc != null) {
  
              LinearLayout specials_container = findViewById(R.id.specials_container);
  
              View sep = new View(context);
              LinearLayout.LayoutParams sepParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, dpToPx(1));
              sepParams.setMargins(0, dpToPx(5), 0, dpToPx(5));
              sep.setLayoutParams(sepParams);
              sep.setBackgroundColor(Color.parseColor("#aaaaaa"));
  
              specials_container.addView(sep);
  
              TextView cw_title = new TextView(context);
              cw_title.setTypeface(Typeface.DEFAULT, Typeface.BOLD);
              cw_title.setBackgroundColor(context.getResources().getColor(getResIdFromAttribute(context, R.attr.char_info_header_bg)));
              cw_title.setTextColor(context.getResources().getColor(getResIdFromAttribute(context, R.attr.char_info_header_txt)));
              cw_title.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT));
              cw_title.setText(context.getString(R.string.cw_text));
              specials_container.addView(cw_title);
  
              HtmlTextView cw_description = new HtmlTextView(context);
              cw_description.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT));
              cw_description.setText(cwDesc);
              cw_description.setTextColor(context.getResources().getColor(getResIdFromAttribute(context, R.attr.char_info_txt)));
              specials_container.addView(cw_description);
  
              if (cwNotes != null) {
                  HtmlTextView cw_notes = new HtmlTextView(context);
                  cw_notes.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT));
                  cw_notes.setText(context.getString(R.string.notes_text) + cwNotes);
                  cw_notes.setTextColor(context.getResources().getColor(getResIdFromAttribute(context, R.attr.char_info_header_txt)));
                  specials_container.addView(cw_notes);
              }
          }
  
          if (charLimits != null) {
              LinearLayout limitbreak_content = findViewById(R.id.limitbreak_content);
              /*ScrollView limitbreakScroll = new ScrollView(context);
              limitbreakScroll.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,
                      LinearLayout.LayoutParams.MATCH_PARENT));*/
              LinearLayout limitbreakContent = new LinearLayout(context);
              limitbreakContent.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
                      ViewGroup.LayoutParams.MATCH_PARENT));
              limitbreakContent.setOrientation(LinearLayout.VERTICAL
              );
              ArrayList<String> limEntries = charLimits.getLimitEntries();
              for (String entry : limEntries) {
                  TextView limitRow = new TextView(context); //ROW WITH LIMIT BREAK TEXT
                  limitRow.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
                          ViewGroup.LayoutParams.WRAP_CONTENT));
                  limitRow.setText(entry);
                  limitRow.setTextColor(context.getResources().getColor(getResIdFromAttribute(context, R.attr.char_info_txt)));
                  limitbreakContent.addView(limitRow);
              }
              String limitNotes = charLimits.getLimitNotes();
              if ((limitNotes != null) && (!limitNotes.equals(""))) {
                  TextView limitRow = new TextView(context); //ROW WITH LIMIT BREAK TEXT
                  limitRow.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
                          ViewGroup.LayoutParams.WRAP_CONTENT));
                  limitRow.setText(context.getResources().getString(R.string.limitnotes) + " " + limitNotes);
                  limitRow.setTextColor(context.getResources().getColor(getResIdFromAttribute(context, R.attr.char_info_header_txt)));
                  limitbreakContent.addView(limitRow);
              }
  
              if (charPotentials != null) {
                  TextView limitRow = new TextView(context); //ROW WITH LIMIT BREAK TEXT
                  limitRow.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
                          ViewGroup.LayoutParams.WRAP_CONTENT));
                  limitRow.setText(context.getResources().getString(R.string.potentials));
                  limitRow.setTypeface(limitRow.getTypeface(), Typeface.BOLD);
                  limitRow.setGravity(Gravity.CENTER);
                  limitRow.setTextColor(context.getResources().getColor(getResIdFromAttribute(context, R.attr.char_info_txt)));
                  limitbreakContent.addView(limitRow);
                  LinkedHashMap<String, ArrayList<String>> potEntries = charPotentials.getPotentialEntries();
                  for (Map.Entry<String, ArrayList<String>> potEntry : potEntries.entrySet()) {
                      TextView limitPRow = new TextView(context); //ROW WITH LIMIT BREAK TEXT
                      limitPRow.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
                              ViewGroup.LayoutParams.WRAP_CONTENT));
                      limitPRow.setText(potEntry.getKey());
                      limitPRow.setTypeface(limitPRow.getTypeface(), Typeface.BOLD);
                      limitPRow.setBackgroundColor(context.getResources().getColor(getResIdFromAttribute(context, R.attr.char_info_header_bg)));
                      limitPRow.setTextColor(context.getResources().getColor(getResIdFromAttribute(context, R.attr.char_info_header_txt)));
                      limitbreakContent.addView(limitPRow);
  
                      ArrayList<String> potEntryList = potEntry.getValue();
                      for (String potValue : potEntryList) {
                          TextView limitP2Row = new TextView(context); //ROW WITH LIMIT BREAK TEXT
                          limitP2Row.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
                                  ViewGroup.LayoutParams.WRAP_CONTENT));
                          limitP2Row.setText(potValue);
                          limitP2Row.setTextColor(context.getResources().getColor(getResIdFromAttribute(context, R.attr.char_info_txt)));
                          limitbreakContent.addView(limitP2Row);
                      }
                  }
                  String potentialNotes = charPotentials.getPotentialNotes();
  