- basic build.gradle directory using flatDir
repositories {
mavenCentral()
flatDir {
dirs 'libs'| // | |
| // ViewController.swift | |
| // Repnote | |
| // | |
| // Created by John Neumann on 05/07/2017. | |
| // Copyright © 2017 Audioy. All rights reserved. | |
| // | |
| import UIKit |
| OkHttpClient okHttpClient = new OkHttpClient(); | |
| try { | |
| int cacheSize = 10 * 1024 * 1024 // 10 MiB | |
| Cache cache = new Cache(getCacheDir(), cacheSize); | |
| okHttpClient.setCache(cache); | |
| } catch (IOException e) { | |
| Log.e(TAG, "Could not set cache", e); | |
| } | |
| // Forces cache. Used for cache connection |
| fun View.visible() { | |
| visibility = View.VISIBLE | |
| } | |
| fun View.invisible() { | |
| visibility = View.INVISIBLE | |
| } | |
| fun View.gone() { | |
| visibility = View.GONE |
| @file:JvmName("ExtensionsUtils") | |
| package com.example.piotr.kotlin_project.commons.extension | |
| import android.text.TextUtils | |
| import android.view.LayoutInflater | |
| import android.view.View | |
| import android.view.ViewGroup | |
| import android.widget.ImageView | |
| import com.example.piotr.kotlin_project.R |
| public class FragmentObserver extends Observable { | |
| @Override | |
| public void notifyObservers() { | |
| setChanged(); // Set the changed flag to true, otherwise observers won't be notified. | |
| super.notifyObservers(); | |
| } | |
| } |
System directories
| Method | Result |
|---|---|
| Environment.getDataDirectory() | /data |
| Environment.getDownloadCacheDirectory() | /cache |
| Environment.getRootDirectory() | /system |
External storage directories
| include ':app' | |
| include ':stdlib_kotlin' | |
| project(':stdlib_kotlin').projectDir = new File(settingsDir, './Stdlib_kotlin_android/stdlib_kotlin') | |
| include ':stdlib_android' | |
| project(':stdlib_android').projectDir = new File(settingsDir, './Stdlib_kotlin_android/stdlib_android') | |
| include ':awesome_core' | |
| project(':awesome_core').projectDir = new File(settingsDir, '../../workspace/Awesome_core/lib') |
| <?xml version="1.0" encoding="utf-8"?> | |
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | |
| android:width="24dp" | |
| android:height="24dp" | |
| android:viewportHeight="24.0" | |
| android:viewportWidth="24.0"> | |
| <path | |
| android:fillColor="#FF000000" | |
| android:pathData="M12,4.5C7,4.5 2.73,7.61 1,12c1.73,4.39 6,7.5 11,7.5s9.27,-3.11 11,-7.5c-1.73,-4.39 -6,-7.5 -11,-7.5zM12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5zm0,-8c-1.66,0 -3,1.34 -3,3s1.34,3 3,3 3,-1.34 3,-3 -1.34,-3 -3,-3z" /> | |
| </vector> |
| import javax.crypto.Cipher; | |
| import java.security.spec.KeySpec; | |
| import javax.crypto.spec.PBEKeySpec; | |
| import javax.crypto.SecretKey; | |
| import javax.crypto.spec.SecretKeySpec; | |
| import javax.crypto.SecretKeyFactory; | |
| import java.security.AlgorithmParameters; | |
| import javax.crypto.spec.IvParameterSpec; | |
| public class Decrypter { |