0

Ok so i have a gridview of strings and i want it so when i load the gridview i can have one underlined.

final GridView gridview = (GridView)findViewById(R.id.gridView);
        final ArrayAdapter<String> arrayadapter = new ArrayAdapter<String>(
                this,
                R.layout.customstyle, 
                letters );

        gridview.setNumColumns(COLUMNSIZE);
        gridview.setAdapter(arrayadapter);

here is my gridview code, so how would i set one to underlined?

brian4342
  • 1,265
  • 8
  • 33
  • 69

1 Answers1

0

Why dont you try with custom adapter and pass SpannableString to textview .

SpannableString spanString = new SpannableString(textString);
text.setText(spanString);
dharmendra
  • 7,835
  • 5
  • 38
  • 71
  • @BrianPeach refer this SO question http://stackoverflow.com/questions/4623508/android-textview-bold-and-italic-and-underline – dharmendra Apr 18 '13 at 14:07
  • Thanks for the link but i cant see how thats is relevent as there not using a gridview. i'd be happy to even have one item in the text view bold or change its background color on the load – brian4342 Apr 18 '13 at 14:12
  • the link for SpannableString , that you can apply while using custom adapter view – dharmendra Apr 18 '13 at 14:21