(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| <?xml version="1.0" encoding="utf-8"?> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
| package="com.example" | |
| android:versionCode="1" | |
| android:versionName="1.0"> | |
| <uses-sdk android:minSdkVersion="8"/> | |
| <uses-permission android:name="android.permission.READ_CONTACTS" /> | |
| <application android:label="@string/app_name"> |
| <?php | |
| // API access key from Google API's Console | |
| define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' ); | |
| $registrationIds = array( $_GET['id'] ); | |
| // prep the bundle | |
| $msg = array |
| <?xml version="1.0" encoding="utf-8"?> | |
| <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:app="http://schemas.android.com/apk/res-auto" | |
| xmlns:tools="http://schemas.android.com/tools" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" | |
| tools:context="com.vacuum.app.cinema.MainActivity"> | |
| <!--SOME CODE FOR MY AppBarLayout--> | |
| <!--SOME CODE FOR MY ToolBar--> |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| package com.example.anothersignintest; | |
| import com.google.android.gms.auth.api.Auth; | |
| import com.google.android.gms.auth.api.signin.GoogleSignInAccount; | |
| import com.google.android.gms.auth.api.signin.GoogleSignInOptions; | |
| import com.google.android.gms.auth.api.signin.GoogleSignInResult; | |
| import com.google.android.gms.common.ConnectionResult; | |
| import com.google.android.gms.common.api.GoogleApiClient; | |
| import com.google.android.gms.common.api.OptionalPendingResult; | |
| import com.google.android.gms.common.api.ResultCallback; |
| class HomeRepository @Inject constructor( | |
| val treasureApi: TreasureApi, | |
| val mSharedPreferences: MSharedPreferences | |
| ) { | |
| fun makePrayerCallAsync(): Deferred<Response<PrayerTimeResponse>> { | |
| val capitalCityName = mSharedPreferences.readString(CAPITAL_SHARED_PREFERENCES_KEY) | |
| val countryName = mSharedPreferences.readString(COUNTRY_SHARED_PREFERENCE_KEY) | |
| return treasureApi.getPrayerTimesTodayAsync(capitalCityName, countryName) | |
| } |
| // From - http://stackoverflow.com/a/32724422/906577 | |
| ... | |
| final CollapsingToolbarLayout collapsingToolbar = | |
| (CollapsingToolbarLayout) mRootView.findViewById(R.id.collapsing_toolbar); | |
| AppBarLayout appBarLayout = (AppBarLayout) mRootView.findViewById(R.id.appbar); | |
| appBarLayout.addOnOffsetChangedListener(new AppBarLayout.OnOffsetChangedListener() { | |
| boolean isShow = false; | |
| int scrollRange = -1; |
| <?xml version="1.0" encoding="utf-8"?><!-- | |
| ~ Copyright (C) 2015 The Android Open Source Project | |
| ~ | |
| ~ Licensed under the Apache License, Version 2.0 (the "License"); | |
| ~ you may not use this file except in compliance with the License. | |
| ~ You may obtain a copy of the License at | |
| ~ | |
| ~ http://www.apache.org/licenses/LICENSE-2.0 | |
| ~ | |
| ~ Unless required by applicable law or agreed to in writing, software |
| /* | |
| * Copyright (C) 2017 The Android Open Source Project | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |