概要
Webviewを導入することになったので詰まった箇所を残していきます
今回はAndroidStudioで起動したアプリケーションのタイトルバーの非表示方法と横画面を固定化する方法をまとめます
アプリケーションのタイトルバーの非表示
src/main/res/values/themes.xml
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style>
<!-- タイトルバーの退避 -->
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="android:windowFullscreen">true</item>
<item name="android:windowContentOverlay">@null</item>
</style>
</resources>
横画面を固定化する
以下を追加する
android:name=".MainActivity"
android:screenOrientation="landscape"
src/main/AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<application>
<activity
android:name=".MainActivity"
android:exported="true"
android:screenOrientation="landscape"
>
</activity>
</application>
</manifest>