tamaño studio los letra iconos como codigo celular cambiar agrandar android text android-layout font-size

android - studio - como agrandar los iconos del celular



¿Cómo podemos aumentar el tamaño de fuente en pan tostado? (6)

¿Hay alguna manera de aumentar el tamaño de fuente en pan tostado sin personalizarlo?

No quiero crear un diseño para aumentar el tamaño del texto.

¿Hay alguna manera?

Gracias,

Niki


Aquí es cómo hacer eso con tramos:

SpannableStringBuilder biggerText = new SpannableStringBuilder(text); biggerText.setSpan(new RelativeSizeSpan(1.35f), 0, text.length(), 0); Toast.makeText(context, biggerText, Toast.LENGTH_LONG).show();


Creo que es realizable por esto:

ViewGroup group = (ViewGroup) toast.getView(); TextView messageTextView = (TextView) group.getChildAt(0); messageTextView.setTextSize(25);


No puede aumentar el tamaño de letra sin crear CustomToastView .

This es una pregunta relacionada.


Puede tratar de poner el siguiente código en su Manifiesto:

<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true"/>

Ponlo encima del elemento <Application> .


Trabajando a partir de la respuesta de Ani, otra solución que le permite establecer el tamaño del texto en un valor de dimensión sería algo así como:

public static void showToast(Context context, int resId) { Toast toast = Toast.makeText(context, resId, Toast.LENGTH_LONG); LinearLayout toastLayout = (LinearLayout) toast.getView(); TextView toastTV = (TextView) toastLayout.getChildAt(0); toastTV.setTextSize(TypedValue.COMPLEX_UNIT_PX, context.getResources().getDimension(R.dimen.TEXT_SIZE)); toast.show(); }

Esto le permite igualar el tamaño de sus tostadas para que tengan el mismo tamaño que el especificado en los controles TextView y Button, por ejemplo.


esto es ...

Toast toast = Toast.makeText(context, R.string.yummyToast, Toast.LENGTH_SHORT); //the default toast view group is a relativelayout RelativeLayout toastLayout = (RelativeLayout) toast.getView(); TextView toastTV = (TextView) toastLayout.getChildAt(0); toastTV.setTextSize(30); toast.show();