For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.
This file contains hidden or 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
| build-for-PR: | |
| runs-on: buildjet-4vcpu-ubuntu-2004 | |
| timeout-minutes: 30 |
This file contains hidden or 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
| class MainActivity : AppCompatActivity() { | |
| private lateinit var fotoapparat: Fotoapparat | |
| private lateinit var barcodeScanner: BarcodeScanner | |
| override fun onCreate(savedInstanceState: Bundle?) { | |
| super.onCreate(savedInstanceState) | |
| setContentView(R.layout.activity_main) | |
| initializeBarcodeScanner() |
This file contains hidden or 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 'dart:math' as math; | |
| import 'package:flutter/material.dart'; | |
| import 'package:flutter/rendering.dart'; | |
| import 'package:flutter/scheduler.dart'; | |
| void main() => runApp(ExampleApp()); | |
| class ExampleApp extends StatelessWidget { | |
| @override |
This file contains hidden or 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.your.package | |
| import android.app.Dialog | |
| import android.os.Bundle | |
| import com.your.package.R | |
| import com.google.android.material.bottomsheet.BottomSheetDialog | |
| import com.google.android.material.bottomsheet.BottomSheetDialogFragment | |
| /** | |
| * BottomSheetDialog fragment that uses a custom |
This file contains hidden or 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
| fun isEmailValid(email: String): Boolean { | |
| return Pattern.compile( | |
| "^(([\\w-]+\\.)+[\\w-]+|([a-zA-Z]|[\\w-]{2,}))@" | |
| + "((([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\\.([0-1]?" | |
| + "[0-9]{1,2}|25[0-5]|2[0-4][0-9])\\." | |
| + "([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\\.([0-1]?" | |
| + "[0-9]{1,2}|25[0-5]|2[0-4][0-9]))|" | |
| + "([a-zA-Z]+[\\w-]+\\.)+[a-zA-Z]{2,4})$" | |
| ).matcher(email).matches() | |
| } |
This file contains hidden or 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.support.constraint.ConstraintLayout | |
| android:layout_width="match_parent" | |
| android:layout_height="wrap_content"> | |
| <android.support.constraint.Guideline | |
| android:id="@+id/guideline1" | |
| android:layout_width="wrap_content" | |
| android:layout_height="wrap_content" | |
| android:orientation="vertical" | |
| app:layout_constraintGuide_percent="0.25"/> |
This file contains hidden or 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
| object PreferenceHelper { | |
| fun defaultPrefs(context: Context): SharedPreferences | |
| = PreferenceManager.getDefaultSharedPreferences(context) | |
| fun customPrefs(context: Context, name: String): SharedPreferences | |
| = context.getSharedPreferences(name, Context.MODE_PRIVATE) | |
| inline fun SharedPreferences.edit(operation: (SharedPreferences.Editor) -> Unit) { | |
| val editor = this.edit() |
This file contains hidden or 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
| // Copyright 2017, the Flutter project authors. Please see the AUTHORS file | |
| // for details. All rights reserved. Use of this source code is governed by a | |
| // BSD-style license that can be found in the LICENSE file. | |
| import 'dart:math'; | |
| import 'package:flutter/material.dart'; | |
| void main() { | |
| runApp(new MyApp()); | |
| } |
This file contains hidden or 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.app.Activity; | |
| import android.content.Context; | |
| import android.content.Intent; | |
| import android.content.pm.ResolveInfo; | |
| import android.content.res.AssetFileDescriptor; | |
| import android.database.Cursor; | |
| import android.graphics.Bitmap; | |
| import android.graphics.BitmapFactory; | |
| import android.graphics.Matrix; | |
| import android.media.ExifInterface; |
NewerOlder