2017-02-24 1 views
-3

나누기 방법 2 또는 3 부분으로 상대적 레이아웃을 만드시겠습니까? 어떤 적절한 방법이 있습니까 ..?나누기 방법 두 부분으로 구성된 레이아웃을 한 행에 두 버튼을 추가 할 수있는 것처럼 만들 수 있습니까?

+1

같은 GIF를 넣어 원하는 위치 GIF의 레이아웃을 설정 너는 무엇을 원하니? 이 답변 [here] (http://stackoverflow.com/questions/33752578/how-to-display-gif-on-android-device?rq=1)을 보거나이 [library] (https : // github .com/koral -/android-gif-drawable) – bvarga

+0

이해할 수없는 질문입니다. http://stackoverflow.com/a/34870817/1318946 –

+0

주어진 링크에서 해결책을 찾으십시오. http://stackoverflow.com/questions/6533942/adding-gif-image-in-an-imageview-in-android –

답변

0

방금이 코드와 작업을 사용했습니다. 첫 번째 라이브러리 추가

,

컴파일 'pl.droidsonroids.gif : 안드로이드 - GIF 당김 : 1.2.3'

당신이 이해하지 않는이

<pl.droidsonroids.gif.GifTextView 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:background="@drawable/your_gif"/> 
2

사용이 라이브러리

컴파일 'pl.droidsonroids.gif : 안드로이드 - GIF 당김 : 1.2.3'

<pl.droidsonroids.gif.GifImageView 
     android:id="@+id/gif_iv" 
     android:layout_width="100dp" 
     android:layout_height="100dp" 
     android:scaleType="centerCrop" 
     android:src="@drawable/ic_ani_gif" 
     app:layout_anchor="@+id/rl_holder_view" 
     app:layout_anchorGravity="center|top" /> 
0

는 시도이 하나

"android.resource://[package]/[res id]" 

    Uri myUri =("android.resource://" + context.getPackageName() + "/" 
         + R.drwable.mygifimage); 
    try{ 
     Url myUrl = myUri.toURL(); 
     webView wView = new webView(this); 
     wView.loadUrl(myUrl); 
     setContentView(view); 

     }catch(Exception e){ 
       e.printStackTrace() 
     } 
관련 문제