[php] 안드로이드 웹뷰 정리 2025-07-09 > 팁앤테크

본문 바로가기
사이트 내 전체검색

팁앤테크

[php] 안드로이드 웹뷰 정리 2025-07-09

페이지 정보

본문

res/layout/activity_main.xml

 

<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
   xmlns:app="http://schemas.android.com/apk/res-auto"
   xmlns:tools="http://schemas.android.com/tools"
   android:layout_width="match_parent"
   android:layout_height="match_parent"
   android:fitsSystemWindows="true"
   tools:context=".MainActivity">

       <WebView
           android:id="@+id/webView"
           android:layout_width="match_parent"
           android:layout_height="match_parent"
           android:visibility="visible"
           tools:layout_editor_absoluteX="8dp"
           tools:layout_editor_absoluteY="8dp" />

</androidx.coordinatorlayout.widget.CoordinatorLayout>

 

///////////////////////////////////////////////////////////////////////////////////////////////////

 

java/~~~/SplashActivity.java

 

package esimfree.net;

import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Handler;
import android.os.Bundle;
public class SplashActivity extends AppCompatActivity {
   @Override
   protected void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       setContentView(R.layout.activity_splash);

       Handler handler = new Handler();
       handler.postDelayed(new Runnable() {
           @Override
           public void run() {
               Intent intent = new Intent(getBaseContext(), MainActivity.class);
               startActivity(intent);
               finish();
           }

       }, 500);
   }
}

 

 

///////////////////////////////////////////////////////////////////////////////////////////////////

 

manifests/AndroidManifest.xml
 

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
   xmlns:tools="http://schemas.android.com/tools">

   <uses-permission android:name="android.permission.INTERNET" />

   <application
       android:allowBackup="true"
       android:fullBackupContent="true"
       android:icon="@drawable/splash"
       android:label="@string/app_name"
       android:roundIcon="@drawable/splash"
       android:supportsRtl="true"
       android:theme="@style/Theme.AppCompat.Light.NoActionBar.FullScreen"
       android:usesCleartextTraffic="true"
       android:hardwareAccelerated="true">
       <activity
           android:name=".MainActivity"
           android:exported="true">
           <intent-filter>
               <action android:name="android.intent.action.MAIN" />

               <category android:name="android.intent.category.LAUNCHER" />
           </intent-filter>
       </activity>
   </application>

</manifest>

 

///////////////////////////////////////////////////////////////////////////////////////////////////

 

res/layout/activity_splash.xml

 

<?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"
   android:background="@color/colorPrimary"
   android:weightSum="1">

   <ImageView
       android:src="@drawable/splash_bg"
       android:layout_width="match_parent"
       android:layout_height="wrap_content"
       android:id="@+id/imageView"
       android:layout_weight="1" />
</LinearLayout>

 

///////////////////////////////////////////////////////////////////////////////////////////////////

 

res/values/styles.xml

 

<resources>
   <!-- Base application theme. -->
   <style name="Theme.AppCompat.Light.NoActionBar.FullScreen" parent="@style/Theme.AppCompat.Light">
       <!-- Customize your theme here. -->
       <item name="colorPrimary">@color/colorPrimary</item>
       <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
       <item name="colorAccent">@color/colorAccent</item>
       <!-- add Style -->
       <item name="windowNoTitle">true</item>
       <item name="windowActionBar">false</item>
       <item name="android:windowFullscreen">false</item>
       <item name="android:windowContentOverlay">@null</item>
       <item name="android:windowBackground">@drawable/splash_bg</item>
   </style>
</resources>

 

///////////////////////////////////////////////////////////////////////////////////////////////////

 

java/com.zeronara.webview/MainActivity.java

 

package esimfree.net;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.KeyEvent;
import android.view.Window;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class MainActivity extends AppCompatActivity {
   public WebView webView;

   @Override
   protected void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       requestWindowFeature(Window.FEATURE_NO_TITLE);
       setContentView(R.layout.activity_main);

       webView = (WebView)findViewById(R.id.webView);
       WebSettings webSettings = webView.getSettings();
       webSettings.setJavaScriptEnabled(true);// Application Cache
       webView.getSettings().setCacheMode(WebSettings.LOAD_DEFAULT); // CacheMode
       webView.setWebViewClient(new WebViewClient());
       webView.loadUrl("https://esimfree.net");
   }
}

 

///////////////////////////////////////////////////////////////////////////////////////////////////

 

res/values/strings.xml

 

<resources>
   <string name="app_name">eSIMfree</string>
   <string name="action_settings" translatable="false">Settings</string>
   <!-- Strings used for fragments for navigation -->
   <string name="first_fragment_label" translatable="false">First Fragment</string>
   <string name="second_fragment_label" translatable="false">Second Fragment</string>
   <string name="next" translatable="false">Next</string>
   <string name="previous" translatable="false">Previous</string>

   <string name="lorem_ipsum" translatable="false">
       Processing..
   </string>
</resources>

 

///////////////////////////////////////////////////////////////////////////////////////////////////

 

res/values/colors.xml

 

<?xml version="1.0" encoding="utf-8"?>
<resources>
   <color name="black">#FF000000</color>
   <color name="white">#FFFFFFFF</color>
   <color name="colorPrimary">#FFBF0000</color>
   <color name="colorPrimaryDark">#FF000000</color>
   <color name="colorAccent">#FFBF0000</color>
   <color name="colorSplashBackground">#FFBF0000</color>
</resources>

 

///////////////////////////////////////////////////////////////////////////////////////////////////

 

drawable/splash_background.xml

 

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
   <item android:drawable="@color/colorSplashBackground"/>
   <item>
       <bitmap android:src="@drawable/splash_bg" android:gravity="center" />
   </item>
</layer-list>

추천0

댓글목록

등록된 댓글이 없습니다.

Total 771건 2 페이지
  • RSS
팁앤테크 목록
번호 제목 글쓴이 조회 추천 날짜
746 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 19195 0 02-28
745 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 17749 0 02-28
744 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 17243 0 02-28
743 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 19212 0 02-27
742 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 16941 0 02-27
741 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 17090 0 02-26
740 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 16565 0 02-26
739 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 16707 0 02-22
738 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 16746 0 02-15
737 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 15791 0 01-01
736 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 17242 0 12-29
735 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 21732 0 12-20
734 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 17102 0 12-15
733 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 19318 0 12-10
열람중 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 19350 0 12-10
731 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 17374 0 11-29
730 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 16752 0 10-31
729 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 34269 0 10-20
728 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 18224 0 09-14
727 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 16491 0 06-20
726 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 16281 0 06-20
725 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 26711 0 05-18
724 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 14962 0 05-17
723 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 17021 0 05-14
722 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 45613 0 05-14

검색

회원로그인

회원가입

사이트 정보

株式会社YHPLUS / 대표 : ZERO
〒140-0011 東京都品川区東大井2-5-9-203
050-5539-7787
오픈카카오톡 (YHPLUS) :
https://open.kakao.com/o/slfDj15d

접속자집계

오늘
2,777
어제
4,164
최대
9,679
전체
3,793,379
Copyright (c) 株式会社YHPLUS. All rights reserved.