summaryrefslogtreecommitdiff
path: root/src/us
diff options
context:
space:
mode:
authorLuke Shumaker <shumakl@purdue.edu>2014-05-06 14:10:32 -0400
committerLuke Shumaker <shumakl@purdue.edu>2014-05-06 14:10:32 -0400
commita3716ceb4e1dbbb793819a8c6d2ed57475c59eb7 (patch)
tree0b3ad01004406414896f914138cab1562ae6bc29 /src/us
parent15f9095ae8bf3b652de886a28275c71efaab1ac5 (diff)
Remove the insert symbol view
Diffstat (limited to 'src/us')
-rw-r--r--src/us/minak/IMESymbolsActivity.java54
-rw-r--r--src/us/minak/IMEView.java30
2 files changed, 0 insertions, 84 deletions
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: