我正在尝试在Android v21中设置状态栏文本颜色,但我没有看到它的API方法.这是我到目前为止的背景
MyActivity.java> onCreate:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Window window = getWindow();
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
window.setStatusBarColor(getResources().getColor(R.color.white));
}
Run Code Online (Sandbox Code Playgroud)
显然白色背景上的白色文字将无法正常工作.我正在寻找类似的东西
window.setStatusBarTextColor(getResources().getColor(R.color.orange));
Run Code Online (Sandbox Code Playgroud) 我正在编写一个服务(在 .NET Core 3.1 和 Refit 中,如果重要的话),它从我的 PayPal 业务帐户中提取给定日期范围内的交易活动,以在管理仪表板上使用。目前我正在关注这里的教程:
https://developer.paypal.com/docs/api/get-an-access-token-postman/
和这里:
https://developer.paypal.com/docs/api/transaction-search/v1/
第一部分,我可以得到一个授权密钥就好了(使用 curl 或 postman,curl 下面
curl --location --request POST 'https://api.paypal.com/v1/oauth2/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic <my client id>:<my secret>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
// not sure what this is, postman specific maybe?
--header 'Cookie: tsrce=devdiscoverynodeweb; ts=vr%3D0cee9361171ac120001362adffec14c3%26vreXpYrS%3D1679730671%26vteXpYrS%3D1585061694%26vt%3D0cee9390171ac120001362adffec14c2' \
--data-urlencode 'grant_type=client_credentials'
Run Code Online (Sandbox Code Playgroud)
这在邮递员和我的自定义服务中都给了我一个身份验证令牌。接下来,当我尝试提取交易(在 Postman 和代码中)时,出现错误
卷曲:
curl --location --request GET 'https://api.paypal.com/v1/reporting/transactions?start_date=2020-03-01T00:00:00Z&end_date=2020-03-31T23:59:59Z' \
--header 'Authorization: Bearer <my token>' \
// Postman???
--header 'Cookie: tsrce=devdiscoverynodeweb; ts=vr%3D0cee9361171ac120001362adffec14c3%26vreXpYrS%3D1679730671%26vteXpYrS%3D1585061694%26vt%3D0cee9390171ac120001362adffec14c2'
Run Code Online (Sandbox Code Playgroud)
错误:
{
"localizedMessage": …Run Code Online (Sandbox Code Playgroud)