我收到了以下错误.那么如何解锁我的数据库呢?
10-28 08:43:26.510: ERROR/AndroidRuntime(881): FATAL EXCEPTION: Thread-11
10-28 08:43:26.510: ERROR/AndroidRuntime(881): android.database.sqlite.SQLiteDatabaseLockedException: database is locked
10-28 08:43:26.510: ERROR/AndroidRuntime(881): at android.database.sqlite.SQLiteDatabase.dbopen(Native Method)
10-28 08:43:26.510: ERROR/AndroidRuntime(881): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:983)
10-28 08:43:26.510: ERROR/AndroidRuntime(881): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:956)
10-28 08:43:26.510: ERROR/AndroidRuntime(881): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:1021)
10-28 08:43:26.510: ERROR/AndroidRuntime(881): at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:742)
10-28 08:43:26.510: ERROR/AndroidRuntime(881): at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:221)
10-28 08:43:26.510: ERROR/AndroidRuntime(881): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:149)
10-28 08:43:26.510: ERROR/AndroidRuntime(881): at com.aa.me.vianet.dbAdapter.DbAdapter.open(DbAdapter.java:25)
10-28 08:43:26.510: ERROR/AndroidRuntime(881): at com.aa.me.vianet.services.NotificationManagerThread.run(NotificationManagerThread.java:49)
Run Code Online (Sandbox Code Playgroud) public class AircraftFragmentTab extends Fragment{
private String ac;
public AircraftFragmentTab(String AC){
ac = AC;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState)
{
View aircraftView = inflater.inflate(R.layout.acdetails, container, false);
??? getWindow().setLayout(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
WebView wv = (WebView) aircraftView.findViewById(R.id.webac);
wv.getSettings().setJavaScriptEnabled(true);
wv.loadUrl("http://ABCD/ACInfo.aspx?AC=" + ac);
return aircraftView;
}
Run Code Online (Sandbox Code Playgroud)
}
我正在使用webView,类从Fragment扩展.我怎么在这里使用getWindow()?
我已将ActionBar选项卡添加到我的应用程序中.该下划线的默认颜色为浅蓝色.如何更改所选标签的颜色或样式?
我有一个运行后台服务来获取数据.我检查新数据并发送状态栏通知.发送通知是服务的一部分.当用户看到该通知时,他登录到应用程序并接受它.那个时候我想从状态栏中删除它.我能这样做吗?
我正在使用html5/javascript/jQuery/css进行移动应用程序开发.我在应用程序中有多个textareas.当我点击它输入时,键盘弹出(android选项卡).但是textarea仍然保留在该页面上的位置.键盘弹出时如何滚动页面.
我在SQLite数据库上使用execSQL.sql INSERT strnig是
INSERT INTO Tasks
(_id, Aircraft, Station, Discrepancy,DateCreated, CreatedBy, Status, DateClosed, ClosedBy, ArrivalFlightID, RecordChangedByUI)
VALUES
('271104',' ','ORD','Critical Flight (0496/28)','9/4/2011 6:57:00 PM','SYSTEM','NEW','','null','0','N')
Run Code Online (Sandbox Code Playgroud)
表是
"create table Tasks
(_id integer primary key, "
+ "Aircraft text null, Station text null, Discrepancy text null, DateCreated text null, CreatedBy text null, Status text null, DateClosed text, ClosedBy text null, ArrivalFlightID text null, RecordChangedByUI text null);";
Run Code Online (Sandbox Code Playgroud)
它抛出异常"Empty bindArgs"
谁能告诉我哪里出错了?
我该怎么用
requestLocationUpdates(long minTime, float minDistance, Criteria criteria,
PendingIntent intent)
Run Code Online (Sandbox Code Playgroud)
在BroadcastReciver中,我可以继续获取GPS坐标.
我是否必须为LocationListener创建一个单独的类?
我的项目的目标是当我收到BOOT_COMPLETED开始定期获得GPS拉特和长期时.
我试过的代码是:
public class MobileViaNetReceiver extends BroadcastReceiver {
LocationManager locmgr = null;
String android_id;
DbAdapter_GPS db;
@Override
public void onReceive(Context context, Intent intent) {
if ("android.intent.action.BOOT_COMPLETED".equals(intent.getAction())) {
startGPS(context);
} else {
Log.i("MobileViaNetReceiver", "Received unexpected intent "
+ intent.toString());
}
}
public void startGPS(Context context) {
Toast.makeText(context, "Waiting for location...", Toast.LENGTH_SHORT)
.show();
db = new DbAdapter_GPS(context);
db.open();
android_id = Secure.getString(context.getContentResolver(),
Secure.ANDROID_ID);
Log.i("MobileViaNetReceiver", "Android id is _ _ _ …Run Code Online (Sandbox Code Playgroud) 我正在使用Handlebars来显示评论.
{{#each COMMENTS}}
<div class="heightfix">
<div class="commentIcon"></div>
<label id="commentDate1" class="bold">{{COMMENTON}}</label>:
<label id="commentCreator1" class="bold">{{COMMENTBY_FIRSTNAME}} {{COMMENTBY_LASTNAME}}</label>
<label class="commentContent" id="commenttext_{{ID}}">{{COMMENTTEXT}}</label>
</div>
{{/each}}
Run Code Online (Sandbox Code Playgroud)
在那些评论中,我有INDEX.我想根据他们的索引显示评论.评论0评论1评论2评论3 .....
如何使用自定义功能实现此目的?谢谢
我有一个ListView.点击列表项我开始了Activity.现在我添加了一个Buttonon ListView和onclick一个按钮,我想开始另一个活动.添加按钮后,我可以单击按钮并启动一个活动,但现在我无法单击列表项.listview的项目发生了什么?