am c62d321e: UI fixes for tablets

* commit 'c62d321e8dcb023e8c7299802a75a271b7ca98d9':
  UI fixes for tablets
This commit is contained in:
Vikram Aggarwal
2012-05-03 14:55:45 -07:00
committed by Android Git Automerger
3 changed files with 17 additions and 3 deletions

View File

@@ -16,7 +16,8 @@
** limitations under the License. ** limitations under the License.
*/ */
--> -->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
> >
@@ -25,7 +26,7 @@
<RelativeLayout <RelativeLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerHorizontal="true" android:layout_gravity="center_horizontal"
android:layout_marginTop="318dip" android:layout_marginTop="318dip"
> >
<ImageView android:id="@+id/encroid" <ImageView android:id="@+id/encroid"
@@ -53,10 +54,11 @@
android:layout_width="320dip" android:layout_width="320dip"
android:layout_toRightOf="@+id/passwordLabel" android:layout_toRightOf="@+id/passwordLabel"
android:layout_marginTop="26dip" android:layout_marginTop="26dip"
android:layout_centerVertical="true"
android:orientation="horizontal" android:orientation="horizontal"
> >
<include layout="@layout/crypt_keeper_password_field" /> <include layout="@layout/crypt_keeper_password_field" />
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>
</RelativeLayout> </LinearLayout>

View File

@@ -23,6 +23,7 @@
android:orientation="vertical" android:orientation="vertical"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
> >
<com.android.internal.widget.DigitalClock android:id="@+id/time" <com.android.internal.widget.DigitalClock android:id="@+id/time"
@@ -31,6 +32,7 @@
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_marginTop="8dip" android:layout_marginTop="8dip"
android:layout_gravity="center"
android:layout_marginBottom="8dip" android:layout_marginBottom="8dip"
> >

View File

@@ -476,6 +476,16 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList
mPasswordEntry.setOnEditorActionListener(this); mPasswordEntry.setOnEditorActionListener(this);
mPasswordEntry.requestFocus(); mPasswordEntry.requestFocus();
// Disable the Emergency call button if the device has no voice telephone capability
final TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
if (!tm.isVoiceCapable()) {
final View emergencyCall = findViewById(R.id.emergencyCallButton);
if (emergencyCall != null) {
Log.d(TAG, "Removing the emergency Call button");
emergencyCall.setVisibility(View.GONE);
}
}
final View imeSwitcher = findViewById(R.id.switch_ime_button); final View imeSwitcher = findViewById(R.id.switch_ime_button);
final InputMethodManager imm = (InputMethodManager) getSystemService( final InputMethodManager imm = (InputMethodManager) getSystemService(
Context.INPUT_METHOD_SERVICE); Context.INPUT_METHOD_SERVICE);