2012-03-04 2 views
0

次は、ログインボタンのコードです:今PhoneGapの - ログインボタンUI変更

<button type="submit" data-theme="a" id="loginButton">Login</button> 

iは、ページの中央にログインボタンの大きさや表示を増やす必要があります。アイデアがあれば教えてください。

答えて

1

あなたがecpliseを使用している場合は、そのボタン のプロパティ]セクションの下にLayout weightを使用するか、より迅速な方法が

<button 
    type="submit" 
    data-theme="a" 
    android:layout_width="40dp" //set size depending on your requirements 
    android:layout_width="wrap_content" 
    android:layout_centerInParent="true" 
    id="loginButton"> 

     Login 

    </button> 

EDITを設定することです:申し訳ありませんが、私はあなたが高めたいと思いましたボタンのサイズそれを中心にするために、どのようにページのボタンの中央を作るために

+1

画面に対して、それを中心に説明する RelativeLayout

<RelativeLayout android:id="@+id/RelativeLayout01" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"> <button type="submit" data-theme="a" android:layout_width="40dp" //set size depending on your requirements android:layout_width="wrap_content" android:layout_centerInParent="true" id="loginButton"> Login </button> </RelativeLayout> 

属性android:layout_centerInParent="true"を使うのか? –

+1

私はphonegapとHTMLを使ってボタンを表示しています。私はphonegapボタンを集中するのを助けてください –

関連する問題