我希望保持工具提示值始终可见,并且工具提示的文本应该背景透明。我尝试了https://github.com/material-components/material-components-android/blob/master/docs/components/Slider.md但没有办法让工具提示始终可见
<com.google.android.material.slider.Slider
android:id="@+id/slider_sound_sensitivity"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:valueFrom="0.0"
android:valueTo="100.0"
android:layout_marginTop="@dimen/_8sdp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.508"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txt_sound_sensitivity" />
<com.google.android.material.slider.RangeSlider
android:id="@+id/range_humidity_in_percentage"
style="@style/Myslider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:valueFrom="0.0"
android:valueTo="100.0"
android:layout_marginTop="@dimen/_16sdp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txt_humidity_in_percentage"
app:values="@array/initial_slider_values" />
Run Code Online (Sandbox Code Playgroud) 我已经尝试了很多次,但它给了我同样的错误.设置代理,以便解决这个错误
我有一个像下面的kotlin方法
fun initDrawer(drawerView: DrawerView, drawerLayout: DrawerLayout, context: Context, onRefreshClick: () -> Unit) {
}
Run Code Online (Sandbox Code Playgroud)
但是当我尝试传递initDrawer(drawerView,drawerlayout,this,onRefreshClick())时,它给了我一个错误的required()无法应用于(kotlin.Unit)
是否可以将方法从java传递给kotlin.
我受够了这个错误我不知道如何解决这个错误它没有设置为自动配置模式。我正在尝试自动配置它但它需要自动配置 URL 我不知道 URL。它对我们导入的所有项目都给出了相同的错误。请帮助这个错误我已经尝试了很多天
java.lang.IncompatibleClassChangeError: Class
'org.apache.http.message.BufferedHeader' does not implement
interface 'org.apache.http.NameValuePair' in call to
'java.lang.String org.apache.http.NameValuePair.getValue()'
(declaration of 'com.google.firebase.perf.network.NetworkRequestMetricBuilderUtil'
appears in /data/app/~~mWC7wl-mdiulxrPqJH3MXg==/com.vendsy.tray-5-
xmP-bIr7MJZJOfz9feYA==/base.apk) at com.google.firebase.perf.network.NetworkRequestMetricBuilderUtil.getApacheHttpResponseContentType(NetworkRequestMetricBuilderUtil.java:62)
at com.google.firebase.perf.network.FirebasePerfHttpClient.execute(FirebasePerfHttpClient.java:200)
at com.google.firebase.perf.network.FirebasePerfHttpClient.execute(FirebasePerfHttpClient.java:48)
Run Code Online (Sandbox Code Playgroud)
我尝试添加混淆规则但没有成功
-keep class org.apache.http.HttpResponse { *; }
-dontwarn org.apache.http.**
-keep class com.google.firebase.perf.network.** {*;}
-dontwarn com.google.firebase.perf.network.**
Run Code Online (Sandbox Code Playgroud) 我想访问用户生日和性别,但是当我尝试访问生日时我收到错误.我正在使用Facebook SDK版本facebook-android-sdk:4.18.0.
它给了我这个错误:
{Response:responseCode:400,graphObject:null,error:{HttpStatus:400,errorCode:100,errorType:OAuthException,errorMessage:(#100)尝试在节点类型(User)上访问不存在的字段(user_birthday)}}
这是我的代码:
public class MainActivity extends AppCompatActivity {
private CallbackManager callbackManager;
private TextView info;
private LoginButton loginButton;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
FacebookSdk.sdkInitialize(getApplicationContext());
callbackManager = CallbackManager.Factory.create();
setContentView(R.layout.activity_main);
info = (TextView)findViewById(R.id.info);
loginButton = (LoginButton)findViewById(R.id.login_button);
loginButton.registerCallback(callbackManager, new FacebookCallback<LoginResult>() {
@Override
public void onSuccess(LoginResult loginResult) {
GraphRequest request = GraphRequest.newMeRequest(
loginResult.getAccessToken(),
new GraphRequest.GraphJSONObjectCallback() {
@Override
public void onCompleted(JSONObject object, GraphResponse response) {
Log.v("LoginActivity", response.toString());
// Application code
String email = object.optString("email");
String birthday = object.optString("birthday");
String name = …
Run Code Online (Sandbox Code Playgroud) 当应用程序在后台或被杀死 onRecive onMessageReceived() 未调用时,我在通知中只收到 json。下面是我的服务类
public class AppFireBaseMessagingService extends FirebaseMessagingService {
private static final String TAG = "MyFirebaseMsgService";
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
Log.d(TAG, "From: " + remoteMessage.getFrom());
// Check if message contains a notification payload.
if (remoteMessage.getNotification() != null) {
sendNotification(remoteMessage.getNotification().getTitle(), remoteMessage.getNotification().getBody());
Log.d(TAG, "Message Notification Body: " + remoteMessage.getNotification().getBody());
}
// Check if message contains a data payload.
else if (remoteMessage.getData().size() > 0) {
Log.d(TAG, "Message data payload: " + remoteMessage.getData());
sendNotification(remoteMessage.getData().get("title"), remoteMessage.getData().get("body"));
}
}
@Override
public void …
Run Code Online (Sandbox Code Playgroud) android ×7
android-ide ×1
build.gradle ×1
eclipse ×1
fcmp ×1
gradle ×1
java ×1
kotlin ×1
material-components-android ×1
proguard ×1