【问题标题】:Android: datepicker weird displayAndroid:日期选择器奇怪的显示
【发布时间】:2012-08-21 18:33:20
【问题描述】:

我正在使用 Eclipse 开发一个使用 datepicker 的 Android 表单。我也使用actionbarsherlock。 它显示错误的东西。 另一个问题是微调器不显示 Ñ 之类的特殊字符,而是隐藏了整个单词。

下面的图像和 XML。

https://dl.dropbox.com/u/6955865/picker.png

这是我的 xml 布局代码。

<LinearLayout xmlns:tools="http://schemas.android.com/tools"
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    tools:context=".BuscarTarea" >

    <Spinner
        android:id="@+id/spvina"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

    <Spinner
        android:id="@+id/sptarea"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

    <Spinner
        android:id="@+id/spproducto"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

    <DatePicker
        android:id="@+id/datePicker1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />

    <Button
        android:id="@+id/buscar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:onClick="onClick"
        android:text="Buscar" />

</LinearLayout>

【问题讨论】:

    标签: android eclipse datepicker actionbarsherlock


    【解决方案1】:

    尝试使用日期选择器对话框而不是将选择器嵌入到您的活动/片段布局中。 http://developer.android.com/guide/topics/ui/controls/pickers.html

    您如何为微调器提供数据。也许你读错了这些数据?

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-06-22
    • 2018-08-29
    • 2014-04-21
    • 2021-02-28
    • 2023-03-16
    • 1970-01-01
    相关资源
    最近更新 更多