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
private static final String SOME_KEY = "KEY_ANYTHING_YOU_WANT" | |
public class Preference { | |
// Set Prefrence | |
SharedPreferences.Editor e = PreferenceManager.getDefaultSharedPreferences(context).edit(); | |
e.putBoolean(SOME_KEY, true); | |
e.apply(); | |
// Get Preference | |
return PreferenceManager.getDefaultSharedPreferences(context).getBoolean(SOME_KEY, false); |
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
using System; | |
using UnityEngine; | |
public class MyScript : MonoBehaviour | |
{ | |
public static MyScript Instance { get; private set; } | |
private void Awake() | |
{ | |
if (Instance != null) |
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
using UnityEngine; | |
using UnityEngine.Events; | |
public class Money : MonoBehaviour | |
{ | |
[SerializeField] private int amount = 10000; | |
public static UnityAction<int> OnGrabbed; | |
public void Grab() | |
{ |
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
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
[RequireComponent(typeof(Image))] | |
public class ColorChanger : MonoBehaviour | |
{ | |
private Image _img; | |
private List<Color> _colors = Constants.Colors; | |
private int _minIndex; |
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
using System; | |
using System.Collections; | |
using TMPro; | |
using UnityEngine; | |
using UnityEngine.Events; | |
[RequireComponent(typeof(TextMeshProUGUI))] | |
public class Timer : MonoBehaviour | |
{ | |
private TextMeshProUGUI textUI; |
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 Activity : AppCompatActivity(), Controller.View { | |
private val controller: Controller = Controller() | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_login) | |
controller.attachView(this) | |
} |
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
#built application files | |
*.apk | |
*.ap_ | |
*.aab | |
# Files for the ART/Dalvik VM | |
*.dex | |
# Java class files | |
*.class |
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 { Injectable } from '@angular/core'; | |
import { MatDialog,MatSnackBar } from '@angular/material'; | |
@Injectable() | |
export class AlertService { | |
constructor( | |
private snackBar: MatSnackBar | |
) { } |
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
openPopUp(data: any = {}, isNew?) { | |
this.isPopupOpened = true; | |
let title = isNew ? 'Adicionar Item' : 'Editar Item'; | |
let dialogRef: MatDialogRef<any> = this.dialog.open(PopUpComponent, { | |
width: '1024px', | |
disableClose: true, | |
data: { title: title, payload: data, editMode: !isNew } | |
}) | |
dialogRef.afterClosed().subscribe(res => { | |
this.getItems(); |
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
<div class="text-center"> | |
<img class="mb-05" src="{{ image }}" alt=""/> | |
<h6 class="m-0 pb-1">{{ title }}</h6> | |
</div> |