-
android fisrtdemo下载
资源介绍
1. create table in the local DBMS in android. below is a sample for the table:
private static final String TV_REMOTE_CONFIG_TABLE_CREATE =
"create table " + remote_tables.sTvRemoteConfigTable + " ( "
+ "_id integer primary key autoincrement, "
+ remote_tables.tv_remote_config_table.KEY_REMOTE_ID + " integer not null, "
+ remote_tables.tv_remote_config_table.KEY_REMOTE_BITS + " integer not null, "
+ remote_tables.tv_remote_config_table.KEY_REMOTE_PRE_DATA_BITS + " integer not null, "
+ remote_tables.tv_remote_config_table.KEY_REMOTE_FLAGS + " integer, "
+ remote_tables.tv_remote_config_table.KEY_REMOTE_HEADER_1 + " integer, "
+ remote_tables.tv_remote_config_table.KEY_REMOTE_HEADER_0 + " integer, "
+ remote_tables.tv_remote_config_table.KEY_REMOTE_ONE_1 + " integer, "
+ remote_tables.tv_remote_config_table.KEY_REMOTE_ONE_0 + " integer, "
+ remote_tables.tv_remote_config_table.KEY_REMOTE_ZERO_1 + " integer, "
+ remote_tables.tv_remote_config_table.KEY_REMOTE_ZERO_0 + " integer, "
+ remote_tables.tv_remote_config_table.KEY_REMOTE_PTRAIL_1 + " integer, "
+ remote_tables.tv_remote_config_table.KEY_REMOTE_PTRAIL_0 + " integer, "
+ remote_tables.tv_remote_config_table.KEY_REMOTE_REPEAT_1 + " integer, "
+ remote_tables.tv_remote_config_table.KEY_REMOTE_REPEAT_0 + " integer, "
+ remote_tables.tv_remote_config_table.KEY_REMOTE_GAP + " integer, "
+ remote_tables.tv_remote_config_table.KEY_REMOTE_TOGGLE_BIT + " integer, "
+ remote_tables.tv_remote_config_table.KEY_REMOTE_FREQ + " integer, "
+ remote_tables.tv_remote_config_table.KEY_REMOTE_PRE_DATA + " blob, "
+ remote_tables.tv_remote_config_table.KEY_REMOTE_CONFIG_CODE + " blob not null, "
+ remote_tables.tv_remote_config_table.KEY_POWER + " blob, "
+ remote_tables.tv_remote_config_table.KEY_DIGIT_0 + " blob, "
+ remote_tables.tv_remote_config_table.KEY_DIGIT_1 + " blob, "
+ remote_tables.tv_remote_config_table.KEY_DIGIT_2 + " blob, "
+ remote_tables.tv_remote_config_table.KEY_DIGIT_3 + " blob, "
+ remote_tables.tv_remote_config_table.KEY_DIGIT_4 + " blob, "
+ remote_tables.tv_remote_config_table.KEY_DIGIT_5 + " blob, "
+ remote_tables.tv_remote_config_table.KEY_DIGIT_6 + " blob, "
+ remote_tables.tv_remote_config_table.KEY_DIGIT_7 + " blob, "
+ remote_tables.tv_remote_config_table.KEY_DIGIT_8 + " blob, "
+ remote_tables.tv_remote_config_table.KEY_DIGIT_9 + " blob, "
+ remote_tables.tv_remote_config_table.KEY_VOL_UP + " blob, "
+ remote_tables.tv_remote_config_table.KEY_VOL_DOWN + " blob, "
+ remote_tables.tv_remote_config_table.KEY_CH_UP + " blob, "
+ remote_tables.tv_remote_config_table.KEY_CH_DOWN + " blob, "
+ remote_tables.tv_remote_config_table.KEY_MENU + " blob, "
+ remote_tables.tv_remote_config_table.KEY_ARROW_UP + " blob, "
+ remote_tables.tv_remote_config_table.KEY_ARROW_DOWN + " blob, "
+ remote_tables.tv_remote_config_table.KEY_ARROW_LEFT + " blob, "
+ remote_tables.tv_remote_config_table.KEY_ARROW_RIGHT + " blob, "
+ remote_tables.tv_remote_config_table.KEY_OK + " blob, "
+ remote_tables.tv_remote_config_table.KEY_BACK + " blob, "
+ remote_tables.tv_remote_config_table.KEY_MUTE + " blob, "
+ remote_tables.tv_remote_config_table.KEY_INPUT + " blob, "
+ remote_tables.tv_remote_config_table.KEY_REVERSE + " blob, "
+ remote_tables.tv_remote_config_table.KEY_PIP + " blob);";
2. insert one group of data into the table;
3. implement the UI, please check the attached UI material, to implement your UI.
4. for each time when you start the demo, you need try to get the key code for those keys from dbms and mapping them to those keys in the UI.
5. everytime, you click the key in the UI, the key code will be displayed with the "Toast" tool.