小编Nam*_*ves的帖子

Spinner Android中的半截文字

我在Android上有一个布局,但是如果我改变微调器的大小我的文本被剪切,我尝试自定义背景到微调器并尝试布局默认但不解决.

我的XML:

            <Spinner
                android:id="@+id/spinner2"
                android:layout_width="wrap_content"
                android:layout_height="40px"
                android:layout_marginRight="2dip"
                android:layout_weight="1"
                android:background="@drawable/spinner_custom"
                android:gravity="left|center_vertical"
                android:paddingLeft="4dip"
                android:textSize="16px" />

            <Spinner
                android:id="@+id/spinner2"
                android:layout_width="wrap_content"
                android:layout_height="40px"
                android:layout_marginRight="2dip"
                android:layout_weight="1"
                android:background="@drawable/spinner_custom"
                android:gravity="left|center_vertical"
                android:paddingLeft="4dip"
                android:textSize="16px" />
        </TableRow>
Run Code Online (Sandbox Code Playgroud)

我怎么能解决它?

自定义背景的屏幕:

http://img814.imageshack.us/img814/8284/spinner.jpg

在此输入图像描述

layout android text resize spinner

5
推荐指数
1
解决办法
2797
查看次数

Java - 读取现有进程的输出流

我需要读取在 IBM j9(Windows Mobile 的模拟器 JVM)上运行的进程的输出。我试过这个:

Process p = Runtime.getRuntime().exec("j9.exe");

BufferedReader br = new BufferedReader(new InputStreamReader(
      p.getInputStream()));

String stringLog;
while ((stringLog = br.readLine()) != null) {
   System.out.println(stringLog + "\n");
}
Run Code Online (Sandbox Code Playgroud)

但它不起作用,因为它返回了 的新实例j9.exe,而不是现有进程。

我需要获取从 j9console(现有进程的)记录到 System.out 的所有消息。我该怎么做呢?

java process j9

2
推荐指数
1
解决办法
1344
查看次数

标签 统计

android ×1

j9 ×1

java ×1

layout ×1

process ×1

resize ×1

spinner ×1

text ×1