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
SELECT Name FROM Customer; |
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.dicoding.kotlinacademysubmission.util | |
import android.annotation.SuppressLint | |
import android.content.Intent | |
import android.provider.CalendarContract | |
import android.view.View | |
import com.dicoding.kotlinacademysubmission.match.detail.MatchDetailActivity | |
import org.jetbrains.anko.startActivity | |
import org.jetbrains.anko.support.v4.ctx | |
import java.text.SimpleDateFormat |
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
import android.support.v7.app.AppCompatActivity | |
import android.os.Bundle | |
import android.widget.TextView | |
class MainActivity : AppCompatActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) | |
val textHello = findViewById<TextView>(R.id.text_hello) |
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
FirestoreRecyclerAdapter adapter = new FirestoreRecyclerAdapter<FriendsResponse, FriendsHolder>(response) { | |
@Override | |
public void onBindViewHolder(FriendsHolder holder, int position, FriendsResponse model) { | |
progressBar.setVisibility(View.GONE); | |
holder.textName.setText(model.getName()); | |
holder.textTitle.setText(model.getTitle()); | |
holder.textCompany.setText(model.getCompany()); | |
Glide.with(getApplicationContext()) | |
.load(model.getImage()) | |
.into(holder.imageView); |
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
FirestoreRecyclerOptions<FriendsResponse> response = new FirestoreRecyclerOptions.Builder<FriendsResponse>() | |
.setQuery(query, FriendsResponse.class) | |
.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
Query query = db.collection("friends"); |
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
implementation "com.google.firebase:firebase-firestore:11.4.2" | |
implementation "com.firebaseui:firebase-ui-auth:3.0.0" | |
implementation "com.firebaseui:firebase-ui-firestore:3.0.0" |
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
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context="com.nrohmen.learnkotlin.MainActivity" | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools"> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" |
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.nrohmen.learnkotlin | |
import android.os.Bundle | |
import android.support.v7.app.AppCompatActivity | |
import android.util.Log | |
import android.widget.ImageView | |
import android.widget.TextView | |
import com.bumptech.glide.Glide | |
import com.google.gson.GsonBuilder | |
import retrofit.GsonConverterFactory |
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.nrohmen.learnkotlin | |
import retrofit.http.GET | |
import retrofit.http.Path | |
import rx.Observable | |
/** | |
* Created by root on 7/1/17. | |
*/ | |
interface Service { |