I have four TextView elements that I want to evenly distribute along a horizontal line. This means that all space in the line should be evenly occupied by TextView elements. Like this:

I used to use LinearLayout for this. I had weightSum as 4 and assigned layout_weight of 1 for each TextView element. However, this compromise regarding some functions that I want to implement in my application:
I want to put an EditText element under each of the four TextView elements. When the EditText elements are visible, INVIVIBLE will be set first, and then with one click of the EditTexts button it will become visible, and Textviews visibility will be set to INVISIBLE. This is only possible if I use RelativeLayout
So, how can I use RelativeLayout for four TextView elements, uniformly consuming all the space?
source share