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.sdzshn3.android.news247.Fragments; | |
import android.app.SearchManager; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.SharedPreferences; | |
import android.net.ConnectivityManager; | |
import android.net.NetworkInfo; | |
import android.net.Uri; | |
import android.os.Bundle; |
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 pp.airlineticketbooking; | |
import android.app.ProgressDialog; | |
import android.content.Intent; | |
import android.os.Bundle; | |
import android.util.Log; | |
import android.view.View; | |
import android.widget.Button; | |
import androidx.annotation.NonNull; |
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
import android.annotation.SuppressLint | |
import android.content.Context | |
import android.location.Location | |
import android.location.LocationListener | |
import android.location.LocationManager | |
import android.os.Bundle | |
@SuppressLint("MissingPermission") | |
class MyLocation( | |
context: Context |
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
@Suppress("DEPRECATION") | |
private val isNetworkAvailable: Boolean | |
get() { | |
var result = false | |
val connectivityManager = | |
getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { | |
val networkCapabilities = connectivityManager.activeNetwork ?: return false | |
val activeNetwork = | |
connectivityManager.getNetworkCapabilities(networkCapabilities) ?: return 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
// QR Code Generator | |
implementation 'com.google.zxing:core:3.3.3' | |
private fun generateQr(bookingId: String) { | |
val size = 300 | |
val charset = Charsets.UTF_8 | |
val hintMap = HashMap<EncodeHintType, ErrorCorrectionLevel>() | |
hintMap[EncodeHintType.ERROR_CORRECTION] = ErrorCorrectionLevel.H |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<style>img{display: inline; height: auto; max-width: 100%;}</style> | |
<script> | |
window.MathJax = { | |
tex: { | |
inlineMath: [['${'$'}','${'$'}'], ['\\(','\\)']], | |
processEscapes: 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
@Composable | |
fun MyDropDown( | |
modifier: Modifier = Modifier, | |
onClick: () -> Unit, | |
label: String, | |
placeHolder: String, | |
value: String, | |
error: String = "" | |
) { |