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
mRecyclerView = (RecyclerView) findViewById(R.id.rv); | |
list = generateData(); | |
adapter = new ExpandableItemAdapter(list); | |
final GridLayoutManager manager = new GridLayoutManager(this, 3); | |
manager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() { | |
@Override | |
public int getSpanSize(int position) { | |
return adapter.getItemViewType(position) == ExpandableItemAdapter.TYPE_PERSON ? 1 : manager.getSpanCount(); |
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
const functions = require('firebase-functions'); | |
const admin = require('firebase-admin'); | |
admin.initializeApp(functions.config().firebase); | |
exports.sendPush = functions.database.ref('/snptee/inbox/{userUiid}/{chatId}/{lastMessage}').onWrite(event => { | |
let userUiid = event.params.userUiid; | |
let chatId = event.params.chatId; | |
var lastMessage = event.data.val(); |
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
SearchView searchView; | |
CompositeDisposable compositeDisposable = new CompositeDisposable(); | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
searchView = (SearchView) findViewById(R.id.search_view); |
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
var bundle = Bundle() | |
bundle.putString("este é um teste com bundles", "this a call to all my past resignations") | |
bundle.putInt("quantidade de cupons", 1) | |
bundle.putLong("", 1) | |
val userProperty = UserProperty(name = "fil", email = "test", extra = bundle); | |
for (prop in UserProperty::class.memberProperties) { | |
prop.get(userProperty)?.let { | |
if(prop.returnType.jvmErasure.isSubclassOf(Bundle::class)){ |
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
class GroupUpdateStatusEnum { | |
companion object { | |
@IntDef(OPTION1, OPTION2) | |
@Retention(AnnotationRetention.SOURCE) | |
annotation class GroupUpdateStatus | |
const val OPTION1 = 2L | |
const val OPTION2 = 3L |
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
query LoadGithubRepositories($login: String!){ | |
user(login: $login) { | |
repositories(first:20){ | |
nodes{ | |
id | |
name | |
} | |
} | |
} |
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
private val BASE_URL = "https://api.github.com/graphql" | |
private lateinit var apolloClient: ApolloClient | |
********** | |
apolloClient = ApolloClient.builder() | |
.serverUrl(BASE_URL) | |
.okHttpClient(okHttpClient) | |
.build() |
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
class App : Application() { | |
private val BASE_URL = "https://api.github.com/graphql" | |
//TODO: put your token here man!!! | |
private val GITHUB_AUTH_TOKEN = "" | |
private lateinit var apolloClient: ApolloClient | |
override fun onCreate() { |
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
lateinit var githubRepositoriesCall: ApolloCall<LoadGithubRepositoriesQuery.Data> | |
******** | |
val loadGithubMembersQuery: LoadGithubRepositoriesQuery = LoadGithubRepositoriesQuery.builder() | |
.login("FilipeLipan") | |
.build(); | |
githubRepositoriesCall = application.apolloClient() | |
.query(loadGithubMembersQuery) |
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.xxmassdeveloper.mpchartexample; | |
import android.graphics.Color; | |
import android.graphics.LinearGradient; | |
import android.graphics.Matrix; | |
import android.graphics.Paint; | |
import android.graphics.Shader; | |
import android.graphics.drawable.Drawable; | |
import android.graphics.drawable.GradientDrawable; |
OlderNewer