Finalmente encontré una solución a esto. Está utilizando TitlePageIndicator del indicador de buscapersonas en su proyecto. Para lograr este efecto, debe realizar algunas modificaciones a la clase TitlePageIndicator.
La idea es cambiar el texto en el lado izquierdo hacia la izquierda por una cantidad igual a la mitad de su tamaño (podría ser cualquier cosa) y el texto en el lado derecho hacia la derecha en una cantidad igual a la mitad de su tamaño (podría cualquier cosa).
Para establecer límites a los textos en el lado izquierdo clipViewOnTheLeft (...) se utiliza método y para establecer los límites para el texto en el lado derecho clipViewOnTheRight (...) se utiliza método. Aquí debe hacer estas modificaciones.
Esto es lo que hay que hacer:
/**
* Set bounds for the right textView including clip padding.
*
* @param curViewBound
* current bounds.
* @param curViewWidth
* width of the view.
*/
private void clipViewOnTheRight(RectF curViewBound, float curViewWidth, int right) {
curViewBound.right = right - mClipPadding + curViewWidth/2;
curViewBound.left = curViewBound.right - curViewWidth;
}
/**
* Set bounds for the left textView including clip padding.
*
* @param curViewBound
* current bounds.
* @param curViewWidth
* width of the view.
*/
private void clipViewOnTheLeft(RectF curViewBound, float curViewWidth, int left) {
curViewBound.left = left + mClipPadding - curViewWidth/2;
curViewBound.right = mClipPadding + curViewWidth;
}
Usted tendrá que hacer estos cambios en el archivo TitlePageIndicator.java.
mejor que puedes usar la vista personalizada – Ramkumar