Skip to content

Instantly share code, notes, and snippets.

View gideonseven's full-sized avatar
🎯
Focusing

Gideon Tobing gideonseven

🎯
Focusing
View GitHub Profile
@gideonseven
gideonseven / gist:a5e6625d2b4da8e8c448c2ec640b7ab7
Created April 7, 2024 02:30
Android Studio - File Header
/**
* Created by ${USER} on ${DAY},${MONTH_NAME_FULL},${YEAR}
*/
/**
* Created by Gideon Tobing on ${DAY},${MONTH_NAME_FULL},${YEAR}
* -
* Brisbane, Australia.
*/
@gideonseven
gideonseven / highlightKeywords
Last active October 20, 2022 17:56
highlightKeywords - highlight Specific word in Sentence / String
/**
* @author Gideon
*
* @see "https://medium.com/androiddevelopers/spantastic-text-styling-with-spans-17b0c16b4568"
* @see "https://stackoverflow.com/a/65000483"
* @see SpanType -> enum type of Span
*
*
* @param highlightColor -> TIDAK WAJIB, keyword akan di rubah ke warna ini
* @param message - > WAJIB Di ISI, merupakan kalimat yang akan di tampilkan di text
@gideonseven
gideonseven / Throtle first
Created April 15, 2020 04:37
Throtle first
package com.don.myapplication;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.widget.Button;
import com.jakewharton.rxbinding3.view.RxView;
@gideonseven
gideonseven / WaterJug
Created December 20, 2019 10:33 — forked from deyindra/WaterJug
Water Jug problem with minimum set of steps
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class WaterBucket {
private static int gcd(int a, int b){
if(a==0)
return b;
return gcd(b%a, a);
}
klo mau, ini ada bbrp link course kotlin gratis, termasuk salah satunya dari udacity.
bagus utk referensi bljr.
Berbagai kursus gratis belajar pengembangan Android dengan Kotlin.
Developing Android Apps with Kotlin
by Google (Udacity) : https://s.id/8NSGQ
Advanced Android with Kotlin
<?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:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="259dp">
<androidx.appcompat.widget.AppCompatImageView
public static final String EXTRA_ID = "PERSON_ID";
public static final String EXTRA_NAME = "PERSON_NAME";
public static final String EXTRA_EMAIL = "PERSON_EMAIL";
public static final String EXTRA_IMAGE = "PERSON_IMAGE";
ApiClient apiClient;
/****FILL THIS WITH YOUR INFORMATION*********/
//This is the public api key of our application
@gideonseven
gideonseven / ConvertAndroidVectorDrawable2png.md
Created December 20, 2017 03:47 — forked from qinshulei/ConvertAndroidVectorDrawable2png.md
Convert Android VectorDrawable to png

转换方法:

  1. Convert Android VectorDrawable to SVG:

使用附件中的java程序。命令如下:

cp Vector2Svg.java path/to/xml_dir
javac Vector2Svg.java
java Vector2Svg ./*.xml
mkdir svg_dir
package don.ctrl.wallpaperproject.ui.product;
import android.content.Intent;
import android.content.SharedPreferences;
import android.media.Image;
import android.preference.PreferenceManager;
import android.support.v4.view.ViewPager;
import android.os.Bundle;
import android.util.Log;
import android.view.MenuItem;