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 'package:flutter/material.dart'; | |
| import './models/transaction.dart'; | |
| import './widgets/chart.dart'; | |
| import './widgets/transaction_list.dart'; | |
| import './widgets/new_transaction.dart'; | |
| void main() { | |
| // Import this -> import 'package:flutter/services.dart'; | |
| // SystemChrome.setPreferredOrientations([ | |
| // DeviceOrientation.portraitUp, |
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 'package:flutter/material.dart'; | |
| import './models/transaction.dart'; | |
| import './widgets/chart.dart'; | |
| import './widgets/transaction_list.dart'; | |
| import './widgets/new_transaction.dart'; | |
| void main() { | |
| // Import this -> import 'package:flutter/services.dart'; | |
| // SystemChrome.setPreferredOrientations([ | |
| // DeviceOrientation.portraitUp, |
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 androidx.arch.core.executor.testing.InstantTaskExecutorRule | |
| import androidx.lifecycle.Observer | |
| import com.nhaarman.mockitokotlin2.mock | |
| import com.nhaarman.mockitokotlin2.verify | |
| import org.junit.Rule | |
| import org.junit.Test | |
| class ExampleUnitTest { | |
| @Rule | |
| @JvmField |
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.arch.lifecycle.Observer | |
| import android.arch.lifecycle.ViewModelProviders | |
| import android.os.Bundle | |
| import android.os.Parcelable | |
| import android.support.v7.app.AppCompatActivity | |
| import android.support.v7.widget.LinearLayoutManager | |
| import android.support.v7.widget.RecyclerView | |
| import android.util.Log | |
| import br.com.nglauber.marvel.R | |
| import kotlinx.android.synthetic.main.activity_characters.* |
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
| data class User(val name: String) | |
| data class Message(val title: String, val sender: User?) |
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() { | |
| var listView : ListView? = null | |
| var movies = mutableListOf<String>() | |
| var movieAdapter : ArrayAdapter<String>? = null | |
| override fun onCreate(savedInstanceState: Bundle?) { | |
| super.onCreate(savedInstanceState) | |
| listView = ListView(this) | |
| setContentView(listView) |
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
| public void uploadImage(Bitmap bitmap) { | |
| ByteArrayOutputStream baos = new ByteArrayOutputStream(); | |
| bitmap.compress(Bitmap.CompressFormat.JPEG, 100, baos); | |
| byte[] data = baos.toByteArray(); | |
| FirebaseStorage storage = FirebaseStorage.getInstance(); | |
| StorageReference storageRef = storage.getReferenceFromUrl("gs://you_firebase_app.appspot.com"); | |
| StorageReference imagesRef = storageRef.child("images/name_of_your_image.jpg"); | |
| UploadTask uploadTask = imagesRef.putBytes(data); |
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 System.Linq; | |
| using System.Text; | |
| using Android.App; | |
| using Android.Content; | |
| using Android.OS; | |
| using Android.Runtime; | |
| using Android.Views; | |
| using Android.Widget; |
NewerOlder