android:windowBackground和之间有什么区别android:colorBackground?
例:
<style name = "theme">
 <item name ="android:windowBackground">@color/black</item>
 <item name ="android:colorBackground">@color/black</item>
</style>
哪一个会影响您在加载新活动时看到的颜色?
我正在寻找一种方法来阻止用户将光标位置移动到任何地方.光标应始终保持在当前EditText值的末尾.除此之外,用户不应该在EditText中选择任何内容.您是否知道如何在Android中使用EditText实现这一目标?
澄清一下:用户应该能够插入文本,但仅限于最后.
我一直在设计一个包含可扩展列表的应用程序.在每个列表的末尾,空白EditText已准备好接收注释.我有以下问题; 当我触摸时EditText,屏幕稍微调整大小(不是问题因为调整大小并不总是发生,这取决于我的布局和EditText列表中的位置)并且出现软键盘.然而,在这些事件中,EditText失去焦点并且不会重新获得它.这是非常不方便的,因为没有焦点,尽管键盘可用,键盘输入无法到达EditText.一旦我再次触摸它,EditText行为就像预期的那样.
它变得更加陌生.键盘仍然显示,我可以触摸不同EditText的相同的情况; 它失去了焦点.然而,一旦我通过最初失去焦点,我可以在之前触摸的EditTexts 之间自由移动而没有任何焦点相关的问题.只有当我隐藏软键盘时,"状态"才会消失,我需要点击EditText两次才能编辑它们.
以下是我的代码的摘录.一,empty_comment.xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >
<EditText
    android:id="@+id/blank_box"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:inputType="textCapSentences"
    android:imeOptions="actionDone"
    android:hint="@string/hint"
    android:layout_marginLeft="30dip" >
</EditText>
</LinearLayout>
这里是我使用相关布局的片段的摘录:
convertView = LayoutInflater.from(parent.getContext()).inflate(R.layout.comment_empty, null);
final EditText editText = (EditText) convertView.findViewById(R.id.blank_box);
editText.setOnEditorActionListener(new OnEditorActionListener()
{   
    @Override
    public boolean onEditorAction(TextView v, int actionId, KeyEvent event)
    {
        if(actionId == EditorInfo.IME_ACTION_DONE)
        {
            // Unrelated code
        }
        return true; …我有一个只读数据库连接.有时,当使用SELECT查询从数据库中读取数据时,它会抛出一个SQLiteReadOnlyDatabaseException.
我这样打开连接:
return SQLiteDatabase.openDatabase(path, null, SQLiteDatabase.OPEN_READONLY);
查询是:
Select * FROM BudgetVersions WHERE entityId = ?
我使用数据库读取数据db.rawQuery(),如下所示:
String query = ...;
Cursor c = db.rawQuery(query, new String[]{ activeBudgetId });
try {
    if (c.moveToFirst()) {            
        bv.versionName = c.getString(c.getColumnIndexOrThrow("versionName"));
        return bv;
    } else {
        return null;
    }
} finally {
    c.close();
}
很少,我在这样的调用中遇到了这样的崩溃c.moveToFirst():
Caused by: android.database.sqlite.SQLiteReadOnlyDatabaseException: attempt to write a readonly database (code 776)
at android.database.sqlite.SQLiteConnection.nativeExecuteForCursorWindow(Native Method)
at android.database.sqlite.SQLiteConnection.executeForCursorWindow(SQLiteConnection.java:845)
at android.database.sqlite.SQLiteSession.executeForCursorWindow(SQLiteSession.java:836)
at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:62)
at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:144) …我用两种不同的颜色创建不同的自定义视图.根据我的应用功能,当拖动对象相互重叠时,用户将在屏幕上拖动这些对象.我想区分重叠区域,如何设置重叠区域的组合颜色.请看下面的图片.这里我使用canvas来创建那些自定义视图,两个圆圈是两个不同的视图.
 
 
编辑: 如果我使用不透明度128我能够看到背景颜色,但我想要重叠对象颜色的组合颜色.
将单个char传递给期望CharSequence的方法的最有效方法是什么?
这就是我所拥有的:
textView.setText(new String(new char[] {c} ));
根据这里给出的答案,这是一种明智的方式,在输入是字符数组的情况下.我想知道是否有一个偷偷摸摸的快捷方式,我可以应用于单一案例中.
是否可以为AsyncTask的后台线程命名,就像Java中的普通线程一样:
Thread(Runnable target, String name) 
我已经看到了AsyncTask的代码,默认构造函数默认只提供一个名称
private static final ThreadFactory sThreadFactory = new ThreadFactory() {
    private final AtomicInteger mCount = new AtomicInteger(1);
    public Thread newThread(Runnable r) {
        return new Thread(r, "AsyncTask #" + mCount.getAndIncrement());
    }
};
我想这样做,因为当我调试时,我想知道哪个Asynctask正在访问辅助类中的方法.
我有两个android项目,ProjA需要ProjB(在Eclipse Properties> Java Build Path> Projects> Add> ProjB中).Eclipse中的每个东西都可以编译好,但是当我运行ProjA时,我收到一个错误:
找不到方法XXX,从方法YYY引用.
其中XXX - 是ProjB的方法.
我该如何修复设置?
我正在编写一个自定义适配器用于ListView.
该Adapter接口包括getItem()根据文档返回Objectas的方法  
与数据集中指定位置关联的数据项.
这个对象应该是什么?我只能想象ListView想要打电话toString或打电话equals,因为没有其他你可以做的原始Object.但是我没有方便Object我可以返回,无论如何我都要覆盖,getView所以ListView不需要我的数据集中的String.
我可以回来null或其他完全不相关的东西吗?
android中有符号和无符号.apk文件有多少区别?
我知道只有一个当我整合应用内购买我有未签名.apk它给我错误 
Item version is not same as... 
而且我们也无法在Android设备中安装unsigned .apk文件...
还有其他的差异吗?