Android相关

如何使用Android Studio将网站转换为Android App

PHPer 2022-06-12 1506 0 1


In this tutorial you will learn how to convert website to android app using Android Studio.

在本教程中,您将学习如何使用Android Studio将网站转换为android应用。

Before reading this tutorial I hope that you already have basic knowledge of Android App Development. Otherwise you won’t be able to understand anything.

在阅读本教程之前,我希望您已经具有Android App Development的基本知识。 否则,您将无法理解任何内容。

What I will do here is simply open the website in webview with a loading bar so that it will look like we are using an android app.

我在这里要做的就是简单地在Webview中使用加载栏打开网站,以便看起来我们正在使用android应用。

By using this method you can convert website or wordpress blog into android application. You can follow this link to see an example app that I have created using this process.

通过使用此方法,您可以将网站或wordpress博客转换为android应用程序。 您可以点击此链接查看我使用此过程创建的示例应用程序。

Note: Make sure the website for which you want to create app is responsive, otherwise the app will not look proper.

注意:请确保您要为其创建应用程序的网站具有响应能力,否则该应用程序将无法正常显示。

If you want to integrate admob and google analytics in your app then you can follow below tutorials.

如果您想将admob和Google Analytics(分析)集成到您的应用中,则可以按照以下教程进行操作。

Also Read: Android Google Analytics Integration Tutorial

另请参阅: Android Google Analytics(分析)集成教程

Also Read: Android AdMob Tutorial

另请参阅: Android AdMob教程

db0313a3fa_normal.png

如何将网站转换为Android App (How to Convert Website to Android App)

Create an android studio project with the website name.

使用网站名称创建一个android studio项目。

Add internet access permission to AndroidManifest.xml file.

将互联网访问权限添加到AndroidManifest.xml文件。

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

Add following code in activity_main.xml file. Here I have added a horizontal progress bar with a webview.

activity_main.xml文件中添加以下代码。 在这里,我添加了带有Webview的水平进度条。

activity_main.xml

activity_main.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"
tools:context="com.myudaipurcity.MainActivity">
<ProgressBar
android:id="@+id/progressBar"

android:layout_width="fill_parent"
android:layout_height="5dp"
android:progressDrawable="@drawable/bg_progress_bar_webview" />

<WebView
android:id="@+id/webView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/progressBar"
/>
</RelativeLayout>">

Create an xml file inside drawable folder and add following code in it. It is a custom background for progress bar. You can change the color by changing color code in res/values/color.xml file....

立即注册
分享的网址网站均收集自搜索引擎以及互联网,非查问网运营,查问网并没有提供其服务,请勿利用其做侵权以及违规行为。

更新于:2022-06-12 15:32:44
    您需要登录后才可以评论。 立即注册
    相关内容

    遨游互联网,网上猎奇中~~~

    十部女主性感到令人窒息的美剧 尺度甚至堪比成人片

    真枪实弹,假戏真做,12部具有“实干精神”的电影!

    2022年的“台湾四大三小天后”

    《外国公司问责法》难阻中概股赴美上市(这个标题现在看变成了笑话)

    又一家!腾讯旗下企鹅电竞宣布退市,6月7日终止运营…游戏直播行业增长放缓

    沈曼落幕时代公会易主,虎牙婷儿全资收购,公会更名“依然盛世”

    万里独行悍匪周克华

    知名论坛凯迪社区关闭,启用新域名并改版为信息流资讯站

    十年前最火的豆瓣、猫扑、人人网、天涯社区,为什么现在不火了?

    猫扑,凉了!一代“网红鼻祖”终究还是输给了时代...

    2023年的人人网现在怎么样了

    WEB技术

    WEB技术之前端技术

    WEB技术之后端技术

    WEB应用转手机APP,手机APP制作平台推荐

    WEB应用与手机APP

    Android相关

    2017 年 Web 开发工程师技术发展路线图

    session:手动删除客户端上的所有cookie,再次访问的时候为什么还是登录状态?

    在太保工作中遇到的互联网以及内网问题记录

    IE如何取消阻止跨站脚本

    电销三期打印要安装PageOn的问题

    一些公司网址浏览器兼容性问题

    网址打开页面显示不全,增值税管理系统页面显示不全

    ​UCStar 聊天记录存在哪里

    内网用UcStar聊天记录文件存放路径

    公司内网浏览器设置问题

    各种应用安装包括驱动程序都要内网的管理员账号才能安装

    绿联USB声卡虚拟7.1驱动-绿联官网地址

    互联网相关

    2008年通过互联网领袖扑克牌看中国互联网形势

    我用搜索引擎中遇到的问题和心得

    互联网相关

    2021 回顾展望-转载WoodenStone博客上的

    推荐内容

    分享几个好用的bt搜索bt资源下载网址网站

    影视电影剧集动漫综艺bt资源在线播放网址网站推荐分享

    全网最新bt磁力搜索引擎bt资源bt网站网址分享

    人气美女女优百度指数排行榜(波多野结衣,苍井空,三上悠亚,深田咏美,桥本有菜,北条...

    最强人造人深田咏美,业界的社交女王

    人生起起落落的三上悠亚,成名前的清纯风,怎么搭配出来的?

    业内第一大长腿,桥本有菜的腿究竟有多长

    波多野结衣,岛国业界著作最多的超级劳模

    日本AV界NO.1,苍井空是多少宅男的疯狂?

    美女女优视频混剪 This Girl-Laza Morgan

    怎样使用V2Ray代理和SSTap玩如魔兽世界/绝地求生/LOL台服/战地3/黑色沙漠/彩...

    sstap游戏代理教程 从此玩如魔兽世界/绝地求生/LOL台服/战地3/黑色沙漠/彩虹六...

    影视电影剧集动漫综艺bt资源在线播放网址网站推荐分享