我希望我的程序具有背景颜色#222222
。我在eclipse中的图形编辑器向我显示它有这种颜色但是当我在我的设备上启动应用程序时它仍然是白色背景。
<?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"
android:background="#222222" >
</LinearLayout>
在我的PlaylistFragment.java中:
//This is the fragment which uses this layout
public class PlaylistFragment extends Fragment {
@Override
public View onCreateView( LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState ){
return inflater.inflate(R.layout.fragment_playlist, container, false);
}
}