我正在我的应用程序中实现聊天,当键盘打开时,回收器视图以有线方式运行,卡片自行展开
我试图禁用回收,改变我构建布局的方式,但没有任何效果,我需要了解为什么会发生这种情况以及如何解决它。
视图的 XML 布局
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:orientation="vertical"
tools:context="io.thed.cuju.ChatDetailsFragment">
<LinearLayout
android:id="@+id/linearLayout22"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/chat_image"
android:layout_width="32dp"
android:layout_height="32dp"
tools:src="@drawable/avatar" />
<TextView
android:id="@+id/name_search"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:textSize="16sp"
tools:text="Bradley Anderson" />
</LinearLayout>
<include
android:id="@+id/say_hi"
layout="@layout/say_hi_chat"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone" />
<android.support.constraint.ConstraintLayout
android:id="@+id/chat_list_and_input_section"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v7.widget.RecyclerView
android:id="@+id/chat_details_recyclerView"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="1"
app:layoutManager="android.support.v7.widget.LinearLayoutManager"
app:layout_constraintBottom_toTopOf="@+id/linearLayout5"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/space2"
app:reverseLayout="true"
tools:listitem="@layout/recived_chat_box_item" />
<TextView
android:id="@+id/space2"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/Gray"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<ProgressBar
android:id="@+id/progressBar12"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content" …Run Code Online (Sandbox Code Playgroud) 刚刚导入Facebook SDK崩溃我的Android应用程序,它工作正常,但它开始崩溃,我评论每个部分使用Facebook SDK它仍然崩溃我使用Facebook sdk版本"4.24.0"
07-05 12:50:30.309 10354-10412/andrewhossam.cuju_android E/art: No implementation found for long com.android.tools.profiler.support.network.HttpTracker$Connection.nextId() (tried Java_com_android_tools_profiler_support_network_HttpTracker_00024Connection_nextId and Java_com_android_tools_profiler_support_network_HttpTracker_00024Connection_nextId__)
--------- beginning of crash
07-05 12:50:30.310 10354-10412/andrewhossam.cuju_android E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
Process: andrewhossam.cuju_android, PID: 10354
java.lang.UnsatisfiedLinkError: No implementation found for long com.android.tools.profiler.support.network.HttpTracker$Connection.nextId() (tried Java_com_android_tools_profiler_support_network_HttpTracker_00024Connection_nextId and Java_com_android_tools_profiler_support_network_HttpTracker_00024Connection_nextId__)
at com.android.tools.profiler.support.network.HttpTracker$Connection.nextId(Native Method)
at com.android.tools.profiler.support.network.HttpTracker$Connection.<init>(HttpTracker.java:191)
at com.android.tools.profiler.support.network.HttpTracker$Connection.<init>(HttpTracker.java:186)
at com.android.tools.profiler.support.network.HttpTracker.trackConnection(HttpTracker.java:280)
at com.android.tools.profiler.support.network.httpurl.HttpsURLConnection$.<init>(HttpsURLConnection$.java:55)
at com.android.tools.profiler.support.network.httpurl.HttpURLWrapper.wrapURLConnectionHelper(HttpURLWrapper.java:40)
at com.android.tools.profiler.support.network.httpurl.HttpURLWrapper.wrapURLConnection(HttpURLWrapper.java:55)
at com.facebook.GraphRequest.createConnection(GraphRequest.java:1410)
at com.facebook.GraphRequest.toHttpConnection(GraphRequest.java:1070)
at com.facebook.GraphRequest.executeBatchAndWait(GraphRequest.java:1158)
at com.facebook.GraphRequest.executeBatchAndWait(GraphRequest.java:1134)
at com.facebook.GraphRequest.executeBatchAndWait(GraphRequest.java:1118)
at com.facebook.GraphRequest.executeAndWait(GraphRequest.java:1093)
at com.facebook.GraphRequest.executeAndWait(GraphRequest.java:987)
at com.facebook.internal.FetchedAppSettingsManager.getAppSettingsQueryResponse(FetchedAppSettingsManager.java:207)
at com.facebook.internal.FetchedAppSettingsManager.access$100(FetchedAppSettingsManager.java:47)
at com.facebook.internal.FetchedAppSettingsManager$1.run(FetchedAppSettingsManager.java:122) …Run Code Online (Sandbox Code Playgroud)