Files
app_Settings/src/com/android/settings/inputmethod/UserDictionaryAddWordActivity.java
Jean Chalard e17eefab87 Add the new add_word interface.
This is step 2. The interface is not functional yet.

Bug: 5306641
Change-Id: Idc8d07b883a17067f777c86d83994fb040b37c59
2011-12-07 11:48:19 +09:00

42 lines
1.4 KiB
Java

/*
* Copyright (C) 2011 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.settings.inputmethod;
import com.android.settings.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.EditText;
public class UserDictionaryAddWordActivity extends Activity {
private static final String EXTRA_WORD = "word";
private EditText mEditText;
@Override
public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.user_dictionary_add_word);
final Intent intent = getIntent();
final String word = intent.getStringExtra(EXTRA_WORD);
mEditText = (EditText)findViewById(R.id.user_dictionary_add_word_text);
mEditText.setText(word);
mEditText.setSelection(word.length());
}
}