Skip to content

Instantly share code, notes, and snippets.

View derysudrajat's full-sized avatar

Dery Sudrajat derysudrajat

View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
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="wrap_content"
app:behavior_hideable="true"
app:behavior_peekHeight="56dp"
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
<style name="ItemsTouchable">
<item name="android:clickable">true</item>
<item name="android:drawSelectorOnTop">true</item>
<item name="android:focusable">true</item>
<item name="android:foreground">?android:attr/selectableItemBackground</item>
</style>
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/contentItem"
style="@style/ItemsTouchable"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
//CardView
implementation 'androidx.cardview:cardview:1.0.0'
//RecycleView
implementation 'androidx.recyclerview:recyclerview:1.1.0'
//Design
implementation 'com.google.android.material:material:1.2.0-alpha06'
//Glide
implementation 'com.github.bumptech.glide:glide:4.11.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@derysudrajat
derysudrajat / MainActivity.java
Created April 4, 2020 19:28
Example of Firebase Auth using Phone Verification
package com.derysudrajat.firebaseauth;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import com.google.android.material.textfield.TextInputLayout;
@derysudrajat
derysudrajat / struct.cpp
Created March 26, 2020 09:55
Introduction of Struct in C++
// Copyright(c) 2020, this code was made by Dery Sudrajat
// array of structures
#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
using namespace std;
struct pembeli
{
@derysudrajat
derysudrajat / MainActivity.kt
Created February 19, 2020 07:56
Example of Firebase ML-KIT On-Device Translation
/*
* Copyright (c) 2020. this code made by Dery Sudrajat
*/
package com.derysudrajat.firebasemlkittranslate
import android.os.Bundle
import android.util.Log
import androidx.appcompat.app.AppCompatActivity
import com.google.firebase.ml.naturallanguage.FirebaseNaturalLanguage
@derysudrajat
derysudrajat / MainActivity.kt
Last active February 19, 2020 07:39
Example of Firebase ML-KIT On-Device Translation
/*
* Copyright (c) 2020. this code made by Dery Sudrajat
*/
package com.derysudrajat.firebasemlkittranslate
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import kotlinx.android.synthetic.main.activity_main.*
@derysudrajat
derysudrajat / build.gradle
Last active February 19, 2020 07:30
Example of Firebase ML-KIT On-Device Translation
dependencies {
//... other dependencies
// ML-KIT OnDeviceTranslator
implementation 'com.google.firebase:firebase-ml-natural-language:22.0.0'
implementation 'com.google.firebase:firebase-ml-natural-language-translate-model:20.0.7'
}
apply plugin: 'com.google.gms.google-services'