diff options
-rw-r--r-- | AndroidManifest.xml | 8 | ||||
-rw-r--r-- | res/layout/ime.xml | 7 | ||||
-rw-r--r-- | res/layout/symbols.xml | 17 | ||||
-rw-r--r-- | src/us/minak/IMESymbolsActivity.java | 54 | ||||
-rw-r--r-- | src/us/minak/IMEView.java | 30 |
5 files changed, 0 insertions, 116 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index fe5bd1c..79290e8 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -41,14 +41,6 @@ <activity android:name="SettingsCreateGestureActivity" android:label="@string/label_create_gesture" /> - - <!-- The insert-symbol dialog from Penboard --> - <activity - android:name="IMESymbolsActivity" - android:configChanges="orientation|keyboardHidden" - android:screenOrientation="portrait" - android:theme="@android:style/Theme.Dialog" > - </activity> </application> </manifest> diff --git a/res/layout/ime.xml b/res/layout/ime.xml index ddabd0c..26f5ed1 100644 --- a/res/layout/ime.xml +++ b/res/layout/ime.xml @@ -11,13 +11,6 @@ android:orientation="vertical" > <Button - android:id="@+id/symbols_btn" - android:layout_width="85dp" - android:layout_height="85dp" - android:layout_marginBottom="5dp" - android:layout_marginTop="10dp" /> - - <Button android:id="@+id/shift_btn" android:layout_width="85dp" android:layout_height="85dp" diff --git a/res/layout/symbols.xml b/res/layout/symbols.xml deleted file mode 100644 index 2fa1a71..0000000 --- a/res/layout/symbols.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="400dp" - android:background="@android:color/transparent" - android:orientation="horizontal" > - - <GridView - android:id="@+id/symbols_gridview" - android:layout_width="fill_parent" - android:layout_height="fill_parent" - android:columnWidth="40dp" - android:gravity="center" - android:numColumns="auto_fit" - android:stretchMode="columnWidth" /> - -</LinearLayout> diff --git a/src/us/minak/IMESymbolsActivity.java b/src/us/minak/IMESymbolsActivity.java deleted file mode 100644 index 39f1849..0000000 --- a/src/us/minak/IMESymbolsActivity.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - ******************************************************************************** - * Copyright (c) 2012 Samsung Electronics, Inc. - * All rights reserved. - * - * This software is a confidential and proprietary information of Samsung - * Electronics, Inc. ("Confidential Information"). You shall not disclose such - * Confidential Information and shall use it only in accordance with the terms - * of the license agreement you entered into with Samsung Electronics. - ******************************************************************************** - */ - -package us.minak; - -import android.app.Activity; -import android.content.Intent; -import android.os.Bundle; -import android.support.v4.content.LocalBroadcastManager; -import android.view.View; -import android.view.Window; -import android.widget.AdapterView; -import android.widget.AdapterView.OnItemClickListener; -import android.widget.ArrayAdapter; -import android.widget.GridView; - -/** - * Represents the window for choosing additional characters. - */ -public class IMESymbolsActivity extends Activity { - public static final String INTENT_ACTION = "com.samsung.penboard.SYMBOL_ENTERED"; - public static final String INTENT_EXTRA_NAME = "symbol"; - private static final Character[] SYMBOLS = new Character[] { '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '!', - '@', '#', '$', '%', '^', '&', '*', '(', ')', '`', '-', '=', '~', '_', '+', '[', ']', '\\', '{', '}', '|', - ';', '\'', ':', '\'', ',', '.', '/', '<', '>', '?' }; - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - requestWindowFeature(Window.FEATURE_NO_TITLE); - setContentView(R.layout.symbols); - final GridView gridView = (GridView) findViewById(R.id.symbols_gridview); - final ArrayAdapter<Character> adapter = new ArrayAdapter<Character>(this, android.R.layout.simple_list_item_1, - SYMBOLS); - gridView.setAdapter(adapter); - gridView.setOnItemClickListener(new OnItemClickListener() { - @Override - public void onItemClick(AdapterView<?> parent, View view, int position, long id) { - final Intent intent = new Intent(INTENT_ACTION); - intent.putExtra(INTENT_EXTRA_NAME, SYMBOLS[position]); - LocalBroadcastManager.getInstance(IMESymbolsActivity.this).sendBroadcast(intent); - } - }); - } -} diff --git a/src/us/minak/IMEView.java b/src/us/minak/IMEView.java index 4a3ec4e..93e4ff6 100644 --- a/src/us/minak/IMEView.java +++ b/src/us/minak/IMEView.java @@ -16,11 +16,7 @@ import java.util.LinkedList; import java.util.Locale; import java.util.Queue; -import android.content.BroadcastReceiver; import android.content.Context; -import android.content.Intent; -import android.content.IntentFilter; -import android.support.v4.content.LocalBroadcastManager; import android.util.AttributeSet; import android.view.View; import android.widget.Button; @@ -30,7 +26,6 @@ import android.widget.RelativeLayout; * Represents the container for the drawing space and the two side panels. */ public class IMEView extends RelativeLayout { - private final Context mContext; private OnCharacterEnteredListener mOnCharacterEnteredListener; private OnBackspacePressedListener mOnBackspacePressedListener; private Button mShiftButton; @@ -43,9 +38,6 @@ public class IMEView extends RelativeLayout { public IMEView(Context context, AttributeSet attrs) { super(context, attrs); - mContext = context; - LocalBroadcastManager.getInstance(mContext).registerReceiver(mBroadcastReceiver, - new IntentFilter(IMESymbolsActivity.INTENT_ACTION)); } @Override @@ -58,10 +50,6 @@ public class IMEView extends RelativeLayout { } }); - final Button symbolsButton = (Button) findViewById(R.id.symbols_btn); - symbolsButton.setOnClickListener(mButtonClickListener); - symbolsButton.setOnLongClickListener(mButtonLongClickListener); - mShiftButton = (Button) findViewById(R.id.shift_btn); mShiftButton.setOnClickListener(mButtonClickListener); mShiftButton.setOnLongClickListener(mButtonLongClickListener); @@ -88,29 +76,12 @@ public class IMEView extends RelativeLayout { } /** - * Receiver for broadcasts coming from the symbols activity. - */ - private final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() { - @Override - public void onReceive(Context context, Intent intent) { - if (IMESymbolsActivity.INTENT_ACTION.equals(intent.getAction())) { - mSymbolsQueue.add(intent.getCharExtra(IMESymbolsActivity.INTENT_EXTRA_NAME, '?')); - } - } - }; - - /** * Listener handling pressing all buttons. */ private final OnClickListener mButtonClickListener = new OnClickListener() { @Override public void onClick(View v) { switch (v.getId()) { - case R.id.symbols_btn: - final Intent intent = new Intent(mContext, IMESymbolsActivity.class); - intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - mContext.startActivity(intent); - break; case R.id.shift_btn: shift(); break; @@ -133,7 +104,6 @@ public class IMEView extends RelativeLayout { @Override public boolean onLongClick(View v) { switch (v.getId()) { - case R.id.symbols_btn: case R.id.shift_btn: break; case R.id.backspace_btn: |