2016-12-23 6 views
0

私のエミュレータでは、10行で私のビューを膨らませますが、私のデバイス(Galaxy S4 v6.0)私の電話機でアンドロイドv7.0を使用していましたが、v6.0にダウングレードして問題が解決するかどうかを確認しました。デバッグまたはリリースでそれを実行しても何も変わりません。私が経験していた問題を引き起こしAPI 23およびAPI 24の既知のバグがありますのでRecyclerViewは私のデバイスの最初の2行だけを表示します

button2nd.Click += async (_, __) => 
      { 
       await mclass.GetSummonerInformation(); 
       iconUrl = string.Format("http://ddragon.leagueoflegends.com/cdn/6.24.1/img/profileicon/" + MyClass.sumProfileIconId + ".png"); 
       DisplaySummonerIcon(iconUrl, imageView1); 
       await mclass.GetSummonerMatchList(); 
       function1(); 

      }; 

private void function1() 
     { 
      game.Clear(); 
      mAdapter.NotifyDataSetChanged(); 
      Thread.Sleep(1000); 
      System.Diagnostics.Debug.WriteLine("This is from the recentgamesdoworkcompleted"); 
      for (int i = 0; i < 10; i++) 
      { 
       if (mclass.win[i]) 
       { 
        winorlose = Color.ParseColor("#42A5F5"); 
       } 
       else 
       { 
        winorlose = Color.ParseColor("#D32F2F"); 

       } 
       System.Diagnostics.Debug.WriteLine("This is from inside the loop of recentgamesdoworkcompleted"); 
       game.Add(new Models.MatchHistoryListView() 
       { 
        Name = "" + mclass.summonerId[0, i], 
        ChampionId = mclass.championId[0, i], 
        Id = i, 
        Score = mclass.summonerScoreText[i], 
        championPortraito = new Uri("http://ddragon.leagueoflegends.com/cdn/6.24.1/img/champion/" + mclass.championName[0, i] + ".png"), 
        Item0 = new Uri("http://ddragon.leagueoflegends.com/cdn/6.24.1/img/item/" + mclass.summonerItems[i, 0] + ".png"), 
        Item1 = new Uri("http://ddragon.leagueoflegends.com/cdn/6.24.1/img/item/" + mclass.summonerItems[i, 1] + ".png"), 
        Item2 = new Uri("http://ddragon.leagueoflegends.com/cdn/6.24.1/img/item/" + mclass.summonerItems[i, 2] + ".png"), 
        Item3 = new Uri("http://ddragon.leagueoflegends.com/cdn/6.24.1/img/item/" + mclass.summonerItems[i, 3] + ".png"), 
        Item4 = new Uri("http://ddragon.leagueoflegends.com/cdn/6.24.1/img/item/" + mclass.summonerItems[i, 4] + ".png"), 
        Item5 = new Uri("http://ddragon.leagueoflegends.com/cdn/6.24.1/img/item/" + mclass.summonerItems[i, 5] + ".png"), 
        Item6 = new Uri("http://ddragon.leagueoflegends.com/cdn/6.24.1/img/item/" + mclass.summonerItems[i, 6] + ".png"), 
        listViewColor = winorlose 



       }); 


      } 
     } 

Main.axmlはここ

<?xml version="1.0" encoding="utf-8"?> 
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
      android:nestedScrollingEnabled="false"> 
    <LinearLayout 
     android:orientation="vertical" 
     android:layout_height="wrap_content" 
     android:layout_width="wrap_content"> 
     <LinearLayout 
      android:orientation="vertical" 
      android:layout_width="fill_parent" 
      android:layout_height="fill_parent"> 
      <Button 
       android:text="Get Summoner Information" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:id="@+id/button1" /> 
      <LinearLayout 
       android:orientation="horizontal" 
       android:layout_width="378.5dp" 
       android:layout_height="49.0dp" 
       android:id="@+id/linearLayout1"> 
       <Spinner 
        android:id="@+id/spinner1" 
        android:layout_width="81.0dp" 
        android:layout_height="41.0dp" /> 
       <EditText 
        android:inputType="textPersonName" 
        android:id="@+id/editText1" 
        android:hint="Type your username here!" 
        android:layout_width="295.5dp" 
        android:layout_height="match_parent" /> 
      </LinearLayout> 
      <ImageView 
       android:layout_width="250.5dp" 
       android:layout_height="113.5dp" 
       android:id="@+id/summonerIcon1" 
       android:visibility="visible" 
       android:layout_gravity="center" /> 
      <TextView 
       android:textAppearance="?android:attr/textAppearanceLarge" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:id="@+id/textView1" 
       android:text="Summoner Information" 
       android:gravity="center" /> 
      <TextView 
       android:text="Name:" 
       android:textAppearance="?android:attr/textAppearanceMedium" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:id="@+id/nameText" /> 
      <TextView 
       android:text="User Id:" 
       android:textAppearance="?android:attr/textAppearanceMedium" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:id="@+id/userIdText" /> 
      <TextView 
       android:text="Revision Date:" 
       android:textAppearance="?android:attr/textAppearanceMedium" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:id="@+id/revisionDateText" /> 
      <Button 
       android:text="Get Mach History" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:id="@+id/matchList" /> 
      <Button 
       android:text="Show Last Game info" 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:id="@+id/lastGameInfoBtn" /> 
     </LinearLayout> 
     <android.support.v7.widget.RecyclerView 
      android:minWidth="25px" 
      android:minHeight="25px" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:id="@+id/recyclerView" 
      android:nestedScrollingEnabled="false"/> 
    </LinearLayout> 
</ScrollView> 
+0

あなたの 'View'には、親を埋めるための2つの項目のための十分な余裕があると思います。したがって、レイアウトXMLなどのコードを投稿する必要があります。 –

+0

障害が発生しているnestedScrollingEnabledになっているようです。レイアウトの下部にあるリサイクラビューをスクロールすることができますが、ストレッチを行い、すべてのアイテムを表示する必要があります。 OP。 –

答えて

0

Android.Support.v4からNestedScrollViewを使用して、それを修正しました。

関連する問題