android琐事日记七

android琐碎日记七对于自定义view 想动态修改里面的属性:SharedPreferences prefs getPreferences(MODE_

android琐碎日记七

对于自定义view 想动态修改里面的属性:SharedPreferences prefs = getPreferences(MODE_PRIVATE); if (!prefs.contains(KEY_FIRST_RUN)) { /* do some one-off stuff here */ prefs.edit().putBoolean(KEY_FIRST_RUN, false).commit(); }

?每次进行检查。

?6.如果SMS超过了160x3 characters 他会自动转换成MMS 在模拟机上

?7.在EditViewView中显示时间

EditText editText = (EditText) findViewById( R.id.your_edittext_id );?

SimpleDateFormat sdf = new SimpleDateFormat( "yyyy/MM/dd" ); ?
editText.setText( sdf.format( new Date() ));?

?

8.去除背景色 可以考虑使用一下

android:background="@android:color/transparent"?

9.SimpleCursorAdapter sca = new SimpleCursorAdapter(this, R.layout.log_item,c,new String[] {DBAdapter.KEY_LOG_TRIPDATE, DBAdapter.KEY_FOO, DBAdapter.KEY_BAR},new int[]{R.id.txtTripDate, R.id.otherid1, R.id.otherid2});?