我有一个图像路径的javascript值,因为路径会不断变化,但现在我需要把这个值放到我的CSS中。我怎么能这样做?
答案 0 :(得分:0)
@Override
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
String SELECTION = String.format("%s =\'1\' AND length(\"%s, \") > 0",
ContactsContract.Contacts.HAS_PHONE_NUMBER,
ContactsContract.Contacts.DISPLAY_NAME_PRIMARY);
return new CursorLoader(context,
ContactsContract.CommonDataKinds.Phone.CONTENT_URI, // URI
ContactProfile.CONTACT_PROJECTION, // projection fields
SELECTION, // the selection criteria
null, // the selection args
ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME_PRIMARY
+ " COLLATE NOCASE ASC" // case insensitive sort order
);
}
这将改变对象的背景图像,我假设你正在尝试做,问题有点不清楚。