Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts

Sunday, October 1, 2017

Failed to Resolve: com.android.support.constraint:constraint-layout:1.0.2


Solution : Click File->Settings->Android SDK->SDK Tools. Then Install :
1. Constrains layout for android
2. Solver for constrains layout

Next... Clean your android project and rebuild again... :)
Doneee...

Wednesday, September 20, 2017

The requested operation cannot be performed on a file with user-mapped section open - Android Studio


Solution :
Rebuild android studio again... aaand... doneee... :)

Tuesday, April 25, 2017

First Time playing with react-native (android)

Installation :
npm install -g react-native-cli --no-optional

Setelah selese tar dapat messeg kek gini :

Naah...terus jalanin emulator androidnya... tunggu emualtornya sampe bener2 siap... :D
Terus tambain path baru ANDROID_HOME dan path directory sdknya kyk gini :

Naaah... terus jalanin perintah 'react-native run-android' :

Naaah.. silahkan sabar menunggu... :D

Sambil nunggu tar emulatornya muncul notif2 kyk gini :

Setelah selesai.... Tar hasil di emulatornya seperti ini....

Nunggu source codenya dibuild agak lebih lama dibanding pake android studio.. :v

Sunday, July 10, 2016

Basic Drawable Vector Android

These are the basic commands for drawing drawable in Android :
  • M = moveto
  • L = lineto
  • H = horizontal lineto
  • V = vertical lineto
  • C = curveto
  • S = smooth curveto
  • Q = quadratic Bézier curve
  • T = smooth quadratic Bézier curveto
  • A = elliptical Arc
  • Z = closepath
So let's create a new drawable vector on androd. Right click on drawable folder, choose "new" then "drawable resource file" :
We're going to have a new file like this :
aaand... let's try to make a triangle first... :D :D :D
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:height="34dp"
    android:width="34dp"
    android:viewportHeight="340"
    android:viewportWidth="340"
    >
    <path
        android:fillColor="#FF0000"
        android:pathData="M150,0 L75,200 L225,200 Z"
        />

</vector>
Sooo... As you might notice from pathData. The first step is we moved to point 150,0 {M150,0}, Then drawing a line to point 75,200 {L75,200} and the last we drawed line to 225,200 {L225,200}. We finally closed the path by putting Z at the end. We don't really need this Z btw... :D But it just a sign that this is the end of the path...:D

So...If we want to draw a start using just L command, the code should be looking like this :
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:height="34dp"
    android:width="34dp"
    android:viewportHeight="340"
    android:viewportWidth="340"
    >
    <path
        android:fillColor="#90FF0F"
        android:pathData="M150,0 L75,200 L245,75 L55,75 L225,200 Z"
        />

</vector>
Okieee...That's all for Part I

Continue to Part II...

Thursday, May 26, 2016

Project Pertama Intel XDK - III

Di part sebelumnya, kita udah buat 2 biji tombol lagi yaitu "Materi" dan "Soal".... Okie disini pertama-tama kita buat page baru lagi, nama pagenya "soal" page ini tar akan dikonekin ke tombol soal... :)
Balik ke page materi, Terus scroll ke bawah jauh.. dibagian kiri ada tab "Interactivity" naah disitu kita hubungin tiap button, back ke main page, materi ke materi, terus soal ke page soal kyk gini :
Naaah....sampe sini kita udah konekin setiap button ke masing-masing page yang bersesuaian.... Berikutnya adalah ngatur background pagenya,,, klik sembarang tempat di page materi,,, terus di panel sebelah kanan tar ada menu background, nah itu diklik trs pilih new :

Daan...silahkan atur2 sendiri backgroundnya sesuai selera... :D
Klu Hisoka kek gini :

Siiips... ini akhir dari quiz kedua... yeeeiii... :D


Beralih ke part berikutnya....


Project Pertama Intel XDK - II

Di Part sebelumnya kita udah nambain button....mmmm.... tulisan buttonnya dikosongin, jadi tinggal iconnya ajjah...
Terus buat style baru, caranya pencet menu "custom" terus pilih "new" :
Terus kasiin nama, misalnya transparent :

Terus di dalam style transparent tersebut, masukin kode ini terus pencet save style :
Naaah...setelah disave kita liad buttonnya jadi transparant kek gini :
Okiee..terus kembali select buttonnya, terus kita buat style baru, tapi sekarang pilih yang "Text" :
Pilih new terus masukin namanya "Putih"
Terus centang pilihan color, terus pencet yang warnanya buat diganti jadi warna putih :

Naaah...tar gambar rumah di buttonnya jadi putih kyk gini :
Tuuuh... jadi putih yang sebelumnya warna item... :D
Neext... drag and drop image :
Naaah... pas kita tambain image XDK-nya otomatis masukin image sendiri, sooo tinggal kita ganti imagenya lewat kotak ijo di sebelah kanan atas jadi kyk gini :
Terus drag and drop 2 biji tombol dan atur jadi kyk gini :
Terus mari kita atur button "Materi" dan "Soal"...Yang akan kita lanjutkan di part berikutnya... :)

Wednesday, May 25, 2016

Membuat Keystore Android

Mmm.... Silahkan menuju ke directory dir java... Terus buka cmd disitu...
Terus masukin command ini :

keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 4096 -validity 100000
disitu silahkan ganti nama_keystorenya sesuai keinginan daan. aliasnya.... 100000 itu jumlah hari... so masukin di cmd :
Terus tekan enter... daaan akan diminta beberapa hal seperti terlihat di bawah :
Klu berhasil tar kliatan tuuh... keystorenya ehehe... :D

Monday, May 23, 2016

Android Gradient Color Examples

To the point ajjah.... Terserah org2 mo ngerti ato g'... yg penting Hisoka ngerti ehehe... :D

Teruuus....

Please pay attention to the angle value...

type and gradientRadius :


For more tag detail please take a look at android doc...
https://developer.android.com/reference/android/graphics/drawable/GradientDrawable.html

Friday, May 20, 2016

Glowing Pressed Button Part II

Okiee... Let's continue our game about button glowing... :v
Next let's add a new button in main layout....
Theeen... Instead of using clickListener, we are using touchListener here...
Aand the result is like this :
Okieee... That's the end of this part... :D
You can see my source code here....