Merge "Start of input method control on system bar."

This commit is contained in:
Daniel Sandler
2010-10-08 08:14:12 -07:00
committed by Android (Google) Code Review
3 changed files with 62 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 384 B

View File

@@ -28,11 +28,11 @@
>
<ImageView
class="com.android.systemui.statusbar.tablet.NotificationIconArea$MoreView"
android:id="@+id/expand"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_sysbar_open"
android:background="@drawable/ic_sysbar_icon_bg"
android:paddingLeft="6dip"
android:onClick="notificationIconsClicked"
/>
@@ -100,8 +100,18 @@
android:background="@drawable/sysbar_hidenotification_handle"
android:layout_marginLeft="8dip"
/>
<com.android.systemui.statusbar.tablet.InputMethodButton
android:id="@+id/imeButton"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="8dip"
android:src="@drawable/ic_sysbar_ime_default"
android:background="@drawable/ic_sysbar_icon_bg"
android:visibility="visible"
/>
</com.android.systemui.statusbar.tablet.NotificationIconArea>
<FrameLayout
android:id="@+id/ticker"
android:layout_width="wrap_content"

View File

@@ -0,0 +1,51 @@
/*
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.systemui.statusbar.tablet;
import android.content.Context;
import android.util.Slog;
import android.view.View;
import android.util.AttributeSet;
import android.widget.ImageView;
import android.view.inputmethod.InputMethodManager;
import com.android.server.InputMethodManagerService;
public class InputMethodButton extends ImageView {
// other services we wish to talk to
InputMethodManager mImm;
public InputMethodButton(Context context, AttributeSet attrs) {
super(context, attrs);
// IME hookup
mImm = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
// TODO: read the current icon & visibility state directly from the service
// TODO: register for notifications about changes to visibility & subtype from service
setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mImm.showInputMethodSubtypePicker();
}
});
}
}