2017-10-17 19 views
0

私はタイムピッカーを持っていますが、すべてうまくいきますが、問題はデザイナーが望むように見せないことです。今のところ、次のようになります: screenshotTimePickerでキーボードアイコンをオフにする方法はありますか?

ボタンの下にあるこのキーボードアイコンを非表示にする必要があります。どうしたらいいですか?それはので、ここでのみ、そのXMLだ、ただのプロトタイプです:

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:orientation="vertical" 
    android:tag="ww"> 

    <TextView 
    android:id="@+id/textView" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:text="Time" 
    android:textAppearance="?android:attr/textAppearanceLarge" /> 

    <TimePicker 
    android:id="@+id/timePicker" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:amPmBackgroundColor="#6400AA" 
    android:numbersSelectorColor="#6400AA" /> 

    <LinearLayout 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_gravity="end" 
    android:orientation="horizontal"> 

    <Button 
     android:id="@+id/button2" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:text="Cancel" 
     android:textColor="#6400AA" /> 

    <Button 
     android:id="@+id/button1" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:text="OK" 
     android:textColor="#6400AA" /> 

    </LinearLayout> 

</LinearLayout> 
+0

アイコンを削除することはできませんが、それはAndroid OのUIの一部です – tyczj

+0

@tyczj Androidの以前のバージョンで変更できますか?それを言う5.1 – VolodymyrH

+1

そのアイコンは以前のバージョンにはありません、そこには時間の手作業の編集を行うために、あなたはいつも時間を変更して変更することができましたが、それはできませんでした。 – tyczj

答えて

1

私の知る限り、このアイコンを削除することはできませんあなたが言うことができるように、それは、Android O.

アイコン上のUIの一部は、以前のバージョンではそれがあったので、時間の手動編集がより明らかにするために存在しているありますあなたが時間をクリックしてキーボードで変更できることは明白ではない

0

は、使用してみてください:あなたはまた、XMLでandroid:descendantFocusability="blocksDescendants"を使用することができます

timePicker.setDescendantFocusability(TimePicker.FOCUS_BLOCK_DESCENDANTS); 

+0

これは動作しません。 – VolodymyrH

関連する問題