乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      Titanium Android中的TextField格式(填充)問(wèn)題

       印度阿三17 2019-06-23

      我正面臨在Titanium Android中格式化簡(jiǎn)單文本字段的問(wèn)題.

      問(wèn)題:我無(wú)法查看輸入的文本字段輸入值.如果我打印日志,它會(huì)進(jìn)入但不可見(jiàn).在某些設(shè)備中,我得到了截止文本.

      以下是我的代碼:

      在我的.js文件中,我有如下文本字段:

      var t1 = Titanium.UI.createTextField({
              value : Titanium.App.Properties.getString("userID"),
              left : 130,
              top : 25,
              height : 30,
              width : 140,
              color : 'black',
              font : {
                  fontSize : 12
              },
              borderStyle : Titanium.UI.INPUT_BORDERSTYLE_ROUNDED
          });
      

      在我的tiapp.xml文件中:

      <android xmlns:android="http://schemas./apk/res/android">
          <manifest>
              <application android:theme="@style/Theme.Titanium"/>
              <supports-screens android:anyDensity="false"
                  android:largeScreens="false"
                  android:normalScreens="false" android:resizeable="false"
                  android:smallScreens="false" android:xlargeScreens="false"/>
          </manifest>
      </android>
      

      嘗試解決方案:我嘗試了鏈接中提供的解決方案:

      > TextField formatting issue
      > TextField formatting
      issue

      它表示你需要將TextField的高度設(shè)置為“Ti.UI.SIZE”add< supports-screens android:anyDensity =“true”/>在你的tiapp.xml文件中添加< property name =“ti.ui.defaultunit”> dp< / property>在你的tiapp.xml文件中.

      如果我將文本字段的高度設(shè)置為“Ti.UI.SIZE”,它會(huì)顯示輸入值,但文本字段的高度對(duì)于屏幕來(lái)說(shuō)太大了,因?yàn)槲业奶囟ㄆ聊恢杏卸鄠€(gè)文本字段,并且看起來(lái)這個(gè)高度太奇怪了.

      任何幫助將不勝感激.

      謝謝.

      更新:在Android 4.4.4和5.0 OS中觀察到問(wèn)題.對(duì)于其他,它的工作正常.

      解決方法:

      最后,我使用在平臺(tái)文件夾下添加的名為mytheme.xml的自定義主題解決了它 – > android文件夾 – > res文件夾 – > values文件夾 – > mytheme.xml

      在mytheme.xml中:

       <?xml version="1.0" encoding="utf-8"?>
          <resources>
          <!-- Define a theme using the AppCompat.Light theme as a base theme -->
          <style name="Theme.MyTheme" parent="@style/Theme.Titanium">
          <!-- For Titanium SDK 3.2.x and earlier, use the Holo.Light or Light theme
          <style name="Theme.MyTheme" parent="@android:style/Theme.Holo.Light">
          -->
              <item name="android:editTextStyle">@style/editText</item>
          </style>
      
          <style name="editText" parent="@android:style/Widget.EditText">
              <item name="android:textCursorDrawable">@null</item>   
              <item name="android:textColor">#000000</item>
              <item name="android:paddingLeft">10dp</item>
              <item name="android:paddingRight">10dp</item>
              <item name="android:background">#FFFFFF</item>
              <item name="android:gravity">center_vertical</item>
              <item name="android:layout_width">wrap_content</item>
          </style>
      </resources>
      

      在tiapp.xml中:

      在android標(biāo)簽下:

      <android xmlns:android="http://schemas./apk/res/android">
          <manifest>
              <application android:theme="@style/Theme.MyTheme"/>
      </manifest>
      </android>
      
      來(lái)源:https://www./content-4-262501.html

        本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購(gòu)買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
        轉(zhuǎn)藏 分享 獻(xiàn)花(0

        0條評(píng)論

        發(fā)表

        請(qǐng)遵守用戶 評(píng)論公約

        類似文章 更多