我试图将ListView textColor设置为黑色,因为我使用的是白色背景.
这是我的MailActivity
public class MailActivity extends ListActivity {
String[] listItems = { "Compose", "Inbox", "Drafts", "Sent" };
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.mails);
setListAdapter(new ArrayAdapter(this,
android.R.layout.simple_list_item_1, listItems));
}
}
Run Code Online (Sandbox Code Playgroud)
和我的XML
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#FFFFFF">
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<TextView
android:id="@android:id/empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Empty set"
android:textColor="#000000" />
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
我将背景设为白色,但不确定将前景设置为黑色.我试过xml,看起来没有帮助.
对我来说,实施和学习是一件非常有趣和新鲜的事情.我的申请有一些要求.为此,我搜索了很多,但找不到合适的,有价值的东西或链接.所以我在这里发帖子.功能是:
1)在三星设备中有Safety Assistance菜单,您可以在其中找到Emergency Mode选项.
2)现在Emergency mode我想在那时创建一个或多个主要联系人Emergency Mode.因此,现在在保持主页和音量按钮时,emergency将激活并通知通知.
3)现在emergency将在同一时刻激活GPS将自动启用,并且将自动捕获当前位置的两张照片,最后位置和两张照片将发送到Emergency mode作为主要联系人添加的联系人MMS.
注意:如果将启用录音机选项,则录音文件也将发送MMS.
所以,如果有人知道或有人实施,那么我非常感谢他/她.帮助将不胜感激.