2016-04-29 45 views
0

xamarin androidの画像をフルスクリーンで表示する方法は?

<FFImageLoading.Views.ImageViewAsync 
 
      android:id="@+id/imgThumbail" 
 
      android:layout_height="500dp" 
 
      android:layout_width="500dp" 
 
      android:layout_marginLeft="10dp" 
 
      android:layout_marginRight="10dp" 
 
      android:layout_marginBottom="10dp" 
 
      android:layout_marginTop="10dp" 
 
      android:layout_gravity="center_vertical" />

enter image description here 私は、高さの幅の500dp、500dpを設定する必要はありません。 上記の画像のように画像の全画面を設定したい。

答えて

1
は、コンポーネント fill_parent(または wrap_content)へのご 500dp

  • wrap_content

を変更

ばかりだけにその内容を囲むのに十分な大き表示したいです。

  • fill_parent

コンポーネントは親と同じ大きさに表示し、残りのスペースを埋めるために望んでいます。

注:fill_parentは、APIレベル8)

+0

私はあなたのやり方を試しましたが、画像は小さいです。この写真には500 pxの幅と高さしかありません。 –

+0

APIレベル22でfill_parentがサポートされていますか? –

2

変更をmatch_parentと改名されたプロパティ

android:layout_height="500dp" 
android:layout_width="500dp" 

android:layout_height="match_parent" 
android:layout_width="match_parent" 

または

android:layout_height="fill_parent" 
android:layout_width="fill_parent" 

(APIレベルの場合は8以下)8

関連する問題