2017-01-12 10 views
0

...親切にhelp..iが試したURLをeverything..thisここ 「http://i.imgur.com/DvpvklR.png」 は、画像enter image description hereアンドロイドの画面にURL画像を合わせるにはどうすればいいですか?私はURLから画像を取得しますが、ブラウザ上での上映など、画面とのフィッティングではないのです

であればあります私たちはそのわずかupside..iが、それはここに私のデバイス上で

を完璧に見てみたい私のデバイス上でTHTを見ることができ、ブラウザ上でURLを実行することは、私のxmlファイルです:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 

    > 


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

     <LinearLayout 
      android:id="@+id/linearLayout1" 
      android:layout_width="match_parent" 
      android:layout_height="0dp" 
      android:layout_weight="0.7"> 

      <ImageView 
       android:id="@+id/ms1" 
       android:layout_width="match_parent" 
       android:layout_height="match_parent" 
       android:scaleType="fitXY" 
       android:src="@drawable/main1" /> 


     </LinearLayout> 

     <LinearLayout 
      android:layout_width="match_parent" 
      android:layout_height="0dp" 
      android:layout_weight="0.3"> 


      <ImageView 
       android:id="@+id/ms2" 
       android:layout_width="match_parent" 
       android:layout_height="match_parent" 
       android:layout_weight=".5" 

       android:scaleType="fitXY" 

       android:src="@drawable/pl2" /> 

      <ImageView 
       android:id="@+id/ms3" 
       android:layout_width="match_parent" 
       android:layout_height="match_parent" 
       android:layout_weight=".5" 
       android:scaleType="fitXY" 
       android:src="@drawable/l1" /> 
     </LinearLayout> 
    </LinearLayout> 


</RelativeLayout> 
+0

画像を画面の背景画像に設定し、他の2つの画像をその画像の上に配置しますか? – fluffyBatman

+0

これはありません第1画像その他の下の画像は第2画像と第3画像です –

+0

背景画像なしメイン画像画像 –

答えて

0

は、それが動作するかどうか

   android:adjustViewBounds="true" 
       android:layout_alignParentBottom="true" 
       android:layout_alignParentTop="true" 
       android:layout_alignParentLeft="true" 
       android:layout_alignParentRight="true" 
+0

をカット投稿後すぐにもう一度やり直せますか? –

+0

woteverイメージを –

+0

をカット,,なし、わずかに上振れ私は、URLに取るそのまだ同じ –

1

あなたはライブラリを使用することができますこの目的のために滑空として知られている

+0

コードに使用する方法...私はURL画像のためにピカソを使用しています。 –

+0

私はアンドロイドに新しいです。それほど多くのabtを知っていません...もしあなたがコーディングthn wud b grtを教えてくれたら –

+0

woteverイメージtake URLにそれが何のちょうどトップ..but単一の画像を示すが、まだ私は答えを編集した –

0

を参照してください、あなたのImageViewのにこれを追加します。

<RelativeLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent"> 


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

     <LinearLayout 
      android:id="@+id/linearLayout1" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content"> 

      <ImageView 
       android:id="@+id/ms1" 
       android:layout_width="match_parent" 
       android:layout_height="match_parent" 
       android:scaleType="fitXY" 
       android:adjustViewBounds="true" 
       android:src="@drawable/main1"/> 


     </LinearLayout> 

     <LinearLayout 
      android:layout_width="match_parent" 
      android:layout_height="0dp" 
      android:layout_weight="1"> 


      <ImageView 
       android:id="@+id/ms2" 
       android:layout_width="match_parent" 
       android:layout_height="match_parent" 
       android:layout_weight=".5" 
       android:scaleType="fitXY" 
       android:src="@drawable/pl2"/> 

      <ImageView 
       android:id="@+id/ms3" 
       android:layout_width="match_parent" 
       android:layout_height="match_parent" 
       android:layout_weight=".5" 
       android:scaleType="fitXY" 
       android:src="@drawable/l1"/> 
     </LinearLayout> 
    </LinearLayout> 


</RelativeLayout> 
+0

を試してみてください少し逆さま –

+0

をcuttedされていないプロジェクトをきれいにし、もう一度 – fluffyBatman

+0

まだまだ同じです... –

関連する問題