小编Rah*_*rma的帖子

EditText框高度问题android

我有一个linearlayout我有一个图像视图,一个textview,两个edittext和按钮.

当我在模拟器或我的设备中运行我的应用程序时,它的高度edittexts似乎更大,而不应该是单行edittext框.

我的layout.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" 
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" 
    android:background="@android:color/white">
    <TextView android:id="@+id/item_blank" 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" 
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:padding="2dp" 
        android:textSize="14dp" 
        android:textColor="@android:color/black"
        android:background="@android:color/white" 
        android:text=" "/>
    <ImageView android:id="@+id/test_image" 
        android:src="@drawable/logo_infraline_energy"
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:layout_gravity="center"/>
    <TextView android:id="@+id/item_title" 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" 
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:padding="2dp" 
        android:textSize="14dp" 
        android:textColor="@android:color/black"
        android:background="@android:color/white" 
        android:text="Please put in your valid credentials to get access."/>
    <EditText android:id="@+id/userName" 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" 
        android:inputType="textEmailAddress" 
        android:layout_weight="1" 
        android:height="30dp"
        android:hint="Email Address" />
    <EditText android:id="@+id/password" 
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" 
        android:layout_weight="1"
        android:hint="Password"
        android:height="30dp" 
        android:password="true" />
    <Button android:id="@+id/loginButton" 
        android:text="Login"
        android:layout_width="wrap_content" …
Run Code Online (Sandbox Code Playgroud)

android android-layout android-edittext

4
推荐指数
1
解决办法
5977
查看次数

Blackberry中的SharedPreferences和Android一样吗?

我想在我的BlackBerry应用程序中实现类似于Android中可用的SharedPreferences类型的东西.我想要做的是在验证它们之后存储登录详细信息,这样用户就不需要一次又一次地登录.

blackberry blackberry-jde

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