Android的微调文字大小 [英] Android spinner text size

查看:116
本文介绍了Android的微调文字大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于一些设计问题我设计我的纺丝器具有较小的宽度和高度。而这个较小的宽度和高度没有显示写在飞旋的提示完整文本。
请帮助,如果任何可能的解决方案,以减少微调的文本大小。

Due to some designing issues i am designing my spinner with smaller width and height. And this smaller width and height not showing complete text written in the prompt of spinner. Please help if any solution possible to decrease the text size of the spinner.

我附上问题的屏幕截图。

I am attaching the screen shot of the problem.

http://www.freeimagehosting.net/9714​​7

推荐答案

使用下面的code根据自己的需要...

Use the below code as per your need...

ArrayAdapter adapter = ArrayAdapter.createFromResource(this, R.array.Questions, R.layout.custom_spinner_list);
            adapter.setDropDownViewResource(R.layout.customer_spinner);
            spin.setAdapter(adapter);

custom_spinner_list.xml

custom_spinner_list.xml

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
    android:text="@+id/TextView01"
    android:id="@+id/TextView01"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:textSize="12dp"
    android:textColor="#000000">
</TextView>

customer_spinner.xml

customer_spinner.xml

<TextView xmlns:android="http://schemas.android.com/apk/res/android"
    android:text="@+id/TextView01"
    android:id="@+id/TextView01"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:textSize="12dp"
    android:textColor="#000000"
    android:height="42dp"
    android:gravity="center_vertical"
    android:padding = "2dp">
</TextView>

这篇关于Android的微调文字大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆