diff options
Diffstat (limited to 'src/us/minak/SketchPadActivity.java')
-rw-r--r-- | src/us/minak/SketchPadActivity.java | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/us/minak/SketchPadActivity.java b/src/us/minak/SketchPadActivity.java new file mode 100644 index 0000000..b415718 --- /dev/null +++ b/src/us/minak/SketchPadActivity.java @@ -0,0 +1,39 @@ + +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.ArrayAdapter; +import android.widget.GridView; +import android.widget.AdapterView.OnItemClickListener; + +public class SketchPadActivity extends Activity { + public static final String INTENT_ACTION = "us.minak.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(SketchPadActivity.this).sendBroadcast(intent); + } + });*/ + } +}
\ No newline at end of file |