What\'s wrong with my code, I\'m trying to display my TextView named \"invalid\", in different locations (left,right,center), but the gravity (left,right,center) w
\"invalid\"
You have given your TextView width wrap_content, and that is the problem, Check below code and replace it to your code.