file로 이미지 표시하는 방법
                                            
                                                
                                                
                                                
                                                
                                                
                                                 4318 단어  Android
                    
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">
    <WebView
        android:id="@+id/upperview"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"/>
    <WebView
        android:id="@+id/lowerview"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"/>
</LinearLayout>
package com.example.urano_joji.test1;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.webkit.WebView;
public class MainActivity extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        WebView upperView = (WebView)findViewById(R.id.upperview);
        upperView.loadUrl("file:///android_asset/android.jpg");
    }
}
build.gradle
android {
    sourceSets{
        main{
            assets.srcDirs = ['htmlSource']
        }
    }
}
 
                Reference
이 문제에 관하여(file로 이미지 표시하는 방법), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/joji/items/327bc6932958b668419f텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)