[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 826건 2 페이지
  • RSS
팁앤테크 목록
번호 제목 글쓴이 조회 추천 날짜
801 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 19190 0 02-28
800 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 17746 0 02-28
799 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 17240 0 02-28
798 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 19204 0 02-27
797 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 16935 0 02-27
796 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 17085 0 02-26
795 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 16558 0 02-26
794 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 16700 0 02-22
793 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 16739 0 02-15
792 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 15787 0 01-01
791 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 17233 0 12-29
790 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 21725 0 12-20
789 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 17096 0 12-15
열람중 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 19339 0 12-10
787 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 19315 0 12-10
786 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 17369 0 11-29
785 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 16746 0 10-31
784 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 34262 0 10-20
783 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 18220 0 09-14
782 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 16488 0 06-20
781 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 16275 0 06-20
780 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 26701 0 05-18
779 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 14954 0 05-17
778 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 17016 0 05-14
777 제로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 45607 0 05-14

검색

회원로그인

회원가입

사이트 정보

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

접속자집계

오늘
1,812
어제
4,164
최대
9,679
전체
3,792,414
Copyright (c) 株式会社YHPLUS. All rights reserved.