Skip to content

Instantly share code, notes, and snippets.

😎
plus ultra

Kang Cahya dyazincahya

😎
plus ultra
View GitHub Profile
@dyazincahya
dyazincahya / README.md
Created Apr 3, 2020 — forked from lopspower/README.md
Hexadecimal color code for transparency
View README.md

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@dyazincahya
dyazincahya / spinner_with_icons
Created Apr 2, 2020 — forked from ControlAdad/spinner_with_icons
Android Spinner with icons
View spinner_with_icons
final Item[] items = {
new Item("Email", android.R.drawable.ic_menu_add),
new Item("Facebook", android.R.drawable.ic_menu_delete),
new Item("...", 0),//no icon for this one
};
ListAdapter adapter = new ArrayAdapter<Item>(
this,
android.R.layout.select_dialog_item,
android.R.id.text1,
@dyazincahya
dyazincahya / order-page.css
Last active Jan 24, 2020
module order VibriPay
View order-page.css
.popup-container{
position: fixed;
z-index:99999;
background-color:#bb000000;
min-height:100;
width:100%;
height:100%;
padding: 30px;
overflow: show;
margin: auto;
@dyazincahya
dyazincahya / popup-model.js
Last active Jan 21, 2020
POPUP NATIVESCRIPT 6.3.1
View popup-model.js
const ObservableArray = require("data/observable-array").ObservableArray;
function xViewModel(items) {
var viewModel = new ObservableArray(items);
return viewModel;
}
module.exports = xViewModel;
@dyazincahya
dyazincahya / TAKE-A-PHOTO-WITH-CAMERA-IN-KOTLIN.md
Last active Jan 20, 2020
ANDROID - TAKE A PHOTO WITH CAMERA IN KOTLIN (https://kang-cahya.com)
View TAKE-A-PHOTO-WITH-CAMERA-IN-KOTLIN.md

TAKE A PHOTO WITH CAMERA IN KOTLIN

SETTING

Step-1

Create provider_paths.xml in res/xml folder and write below code in it.

<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
@dyazincahya
dyazincahya / lang-locales-support.md
Last active Jan 14, 2020
List of languages or locales supported on Android
View lang-locales-support.md

Updated list as of Android 5.1

  • af_ [Afrikaans]
  • af_NA [Afrikaans (Namibia)]
  • af_ZA [Afrikaans (South Africa)]
  • agq_ [Aghem]
  • agq_CM [Aghem (Cameroon)]
  • ak_ [Akan]
  • ak_GH [Akan (Ghana)]
  • am_ [Amharic]
View SolarSystem.java
package ComputerGraphics;
import java.awt.*;
import java.applet.*;
import java.util.Random;
public class SolarSystem extends Applet {
Dimension screen;
Random random;
@dyazincahya
dyazincahya / SolarSystem.java
Last active Dec 1, 2019
Draw solar system with Java Applet [kang-cahya.com]
View SolarSystem.java
package ComputerGraphics;
import java.awt.*;
import java.applet.*;
import java.util.Random;
public class SolarSystem extends Applet {
Dimension screen;
Random random;
@dyazincahya
dyazincahya / Chrome.java
Last active Oct 8, 2019
How to Create a Chrome Icon in Applet ( JAVA )
View Chrome.java
/**
* DRAW GOOGLE CHROME ICON WITH JAVA APPLET
*
* @author (CAHYA DYAZIN)
* @github gist (https://gist.github.com/dyazincahya/faeb74b80bf95964ce07c043bd3e62df)
* @version (8/10/2019)
*/
import java.awt.*;
import java.applet.*;
@dyazincahya
dyazincahya / downloadFile.js
Last active Aug 7, 2019
Function to download files to local in nativescript 4.x
View downloadFile.js
const fs = require('file-system');
const httpModule = require("http");
exports.download = function (args) {
let data = args.object;
context.set("xLoading", { "status": true, "text": "Downloading..." });
// path download path directory in storage
var androidDownloadsPath = android.os.Environment.getExternalStoragePublicDirectory(android.os.Environment.DIRECTORY_DOWNLOADS).toString();
You can’t perform that action at this time.