7

खोला है मैं SendMessageLayout सिर्फ EditText और एक बटन के साथ एक लेआउट है जबकि निम्न लेआउटRecyclerView Actionbar छुपाता है जब SoftKeyboard

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:id="@+id/container"> 

    <com.example.SendMessageLayout 
     android:id="@+id/chatMessageLayout" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:layout_alignParentBottom="true" 
     /> 

    <View 
     android:id="@+id/separator" 
     android:layout_width="match_parent" 
     android:layout_height="0dp" 
     android:layout_above="@id/chatMessageLayout" 
     android:background="@color/seperator_line_inpost" 
     /> 

    <android.support.v4.widget.SwipeRefreshLayout 
     android:id="@+id/swipe_container" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:layout_alignParentTop="true" 
     android:layout_above="@id/separator" 
     > 

     <android.support.v7.widget.RecyclerView 
      android:id="@+id/recycleView" 
      style="@style/BeepMeListView" 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:layout_above="@+id/chatMessageLayout" 
      android:layout_alignParentTop="true" 
      android:transcriptMode="alwaysScroll" 
      /> 
    </android.support.v4.widget.SwipeRefreshLayout> 

</RelativeLayout> 

है। पुराने कार्यान्वयन में मैंने सादे पुराने सूची दृश्य का उपयोग किया, इसलिए जब मैंने संपादन टेक्स्ट के लिए फोकस का अनुरोध किया तो एक कीबोर्ड दिखाई देगा, सूचीदृश्य नहीं चला था, और पहला आइटम दिखाई दे रहा था। लेकिन रीसाइक्लिंग व्यू के साथ सब कुछ धक्का दिया जाता है, न केवल शीर्ष आइटम स्क्रीन से बाहर है बल्कि यह पूरा लेआउट एक्शनबार के शीर्ष पर है।

यहाँ

कि यह कैसा दिखता है ... RecycleView Screenshot

+0

में गतिविधि टैग में मुझे एक ही समस्या है .. क्या कोई मदद कर सकता है? – Sandra

+0

नमस्ते, कोई भाग्य यह पता लगा रहा है? – alexk

+0

क्या आप एक्सएमएल में एक्शनबार को कैसे डाल सकते हैं? – dumbfingers

उत्तर

5

बस एक खाली scrollview, हल जोड़ें: RecyclerView hides Actionbar when SoftKeyboard is opened 解决办法

इस तरह

:

<FrameLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:orientation="vertical" 
    android:layout_height="match_parent" 
    android:layout_width="match_parent" 
    tools:context="me.drakeet.seashell.ui.social.PostActivity"> 

    <ScrollView 
     android:layout_width="match_parent" 
     android:layout_height="match_parent"> 
    </ScrollView> 

    <LinearLayout 
     android:orientation="vertical" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content"> 

     <me.drakeet.seashell.widget.MultiSwipeRefreshLayout 
      android:layout_weight="1" 
      android:layout_marginBottom="4dp" 
      android:id="@+id/swipe_refresh_layout" 
      style="@style/BbsBackground" 
      android:layout_width="match_parent" 
      android:layout_height="match_parent"> 

      <android.support.v7.widget.RecyclerView 
       android:id="@+id/rv_reply_list" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:minHeight="48dp"/> 

     </me.drakeet.seashell.widget.MultiSwipeRefreshLayout> 

     <include 
      android:layout_gravity="bottom" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      layout="@layout/view_reply"/> 
    </LinearLayout> 

</FrameLayout> 
0

मैं एक ही मुद्दा था और मैं इसे जोड़ने हल

android:windowSoftInputMode="adjustResize"

मेनिफेस्ट

संबंधित मुद्दे