This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.dm.tutorialdaynight1 | |
import androidx.appcompat.app.AppCompatActivity | |
import android.os.Bundle | |
import androidx.appcompat.app.AppCompatDelegate //Importazione della Classe AppCompactDelegate | |
class MainActivity : AppCompatActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Imposta il tema scuro | |
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<color name="backgroundwindow">#5F5F5F</color> | |
<color name="textColor">#C8C8C8</color> | |
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<color name="colorPrimary">#008577</color> | |
<color name="colorPrimaryDark">#00574B</color> | |
<color name="colorAccent">#D81B60</color> | |
<color name="backgroundwindow">#FFFFFF</color> | |
<color name="textColor">#000000</color> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
android { | |
//...... | |
//altre istruzioni sono contenute qui | |
//...... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lintOptions { | |
checkReleaseBuilds false | |
// Oppure, se preferisci, puoi continuare a controllare gli errori nelle build di rilascio, | |
// ma continuare la build anche quando vengono rilevati errori: | |
abortOnError false | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.dm.tutorialmanifestmergerfailed"> | |
<application | |
android:allowBackup="true" | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/app_name" | |
android:roundIcon="@mipmap/ic_launcher_round" | |
android:supportsRtl="true" | |
android:theme="@style/Theme.TutorialManifestMergerFailed"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
android:exported = "true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.dm.tutorialwebview11 | |
import android.content.Context //Importazione della Classe: Context | |
import android.net.ConnectivityManager //Importazione della Classe: ConnectivityManager | |
import android.net.NetworkCapabilities //Importazione della Classe: NetworkCapabilities | |
import android.os.Build | |
import androidx.appcompat.app.AppCompatActivity | |
import android.os.Bundle | |
import android.webkit.WebChromeClient | |
import android.webkit.WebView |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(isConnected(this)) | |
{ | |
//aggiungere qui eventuale codice da eseguire se il dispositivo è connesso ad internet | |
} | |
else | |
{ | |
//aggiungere qui eventuale codice da eseguire se il dispositivo NON è connesso ad internet | |
Toast.makeText(this, "Non connesso ad internet", Toast.LENGTH_LONG).show() | |
} |