I have a textview in a horizontal linear layout, and the textview is being top aligned. I want it to be vertically aligned.
I have the textview set to a style called "arrow"
<style name="arrow">
<item name="android:textSize">30sp</item>
<item name="android:textColor">#ffffff</item>
<item name="android:textStyle">bold</item>
<item name="android:gravity">center</item>
<item name="android:layout_gravity">center</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
</style>
java
LinearLayout LL = new LinearLayout(this);
LL.setOrientation(LinearLayout.HORIZONTAL);
LL.setPadding(15, 15, 15, 15);
LinearLayout.LayoutParams courseMargin = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
courseMargin.setMargins(5, 5, 5, 5);
LL.setLayoutParams(courseMargin);
// here I add more things into LL...
TextView arrow = new TextView(this);
arrow.setText(">");
arrow.setTextAppearance(this, R.style.arrow);
LL.addView(arrow);
However this is still not making it vertically aligned...
Does anyone know whats going here?
Thanks