Wednesday, December 20, 2023

Android Studio Hedgehog | 2023.1.1: import java library problem

Causing: Unknown

Symptoms: Can not import any java library

Option:

  • File > Invalidate Caches... -> clear all (Working on my project)
  • File > Sync Project with Gradle Files (not tested)

https://stackoverflow.com/questions/45982092/android-studio-not-recognizing-import-statements

Android Studio Hedgehog | 2023.1.1: manual backup android project

Manual backup android studio 2023 project 

Root project files:

  • build.gradle.kts
  • gradle.properties
  • gradlew
  • gradle.bat
  • local.properties
  • settings.gradle.kts
  • *.jks (java keystore files if you publish your application with signed)

folders root project -> app:

  • build.gradle.kts
  • proguard-rules.pro
  • src (all)

Tuesday, December 19, 2023

Privacy Policy for Kramaning (com.dedetok.kramaning)

Privacy Statement

Your privacy is important to us. This privacy statement explains what Kramaning (com.dedetok.kramaning) application does, regarding your personal data.

Personal data we collect

Kramaning (com.dedetok.kramaning) application does not requesting any information about your personal data.

Network & Internet Connection:

Kramaning (com.dedetok.kramaning) application does not mandatory to use internet connection. You can use Kramaning (com.dedetok.kramaning) application without Internet connection.

If Internet connection exist, Kramaning (com.dedetok.kramaning) application will use it to serving for Google AdMob only.

Contact Us:

If You need to contact Us, here is My email address:

dedetoke2021@gmail.com

Monday, December 18, 2023

Android java: DrawerLayout, Toolbar & NavigationView in java

 

Android Studio Hedgehog | 2023.1.1

Note: For personal reference using DrawerLayout, Toolbar & NavigationView in java

Create new Project (No Activity)

Name TutorDrawerMenu
Package Name com.dedetok.tutordrawermenu

Create Activity -> Empty View Activity

Activity Name: Main Activity
Layout Name activity_main
Laucher Activity checked

AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools">

    <!-- For apps targeting Android 13 or higher & GMA SDK version 20.3.0 or lower -->
    <uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

    <!-- apply android:theme="@style/Theme.AppCompat.Light.NoActionBar" at AndroidManifest.xml -->
    <application
        android:allowBackup="true"
        android:dataExtractionRules="@xml/data_extraction_rules"
        android:fullBackupContent="@xml/backup_rules"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.AppCompat.Light.NoActionBar"
        tools:targetApi="31"
        >
        <!--  android:theme="@style/Theme.AppCompat.Light.NoActionBar" setSupportActionBar(myToolbar); -->

        <activity
...
        </activity>
        <!-- Sample AdMob app ID: ca-app-pub-3940256099942544~3347511713 -->
        <!-- AD App ID: ca-app-pub-0220748109202708~3978959687 -> AndroidManifest.xml -->
        <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="ca-app-pub-0220748109202708~3978959687"/>

    </application>
</manifest>

build.gradle.kts (Module: app)

dependencies {
...
    implementation("com.google.android.gms:play-services-ads-lite:22.6.0")
...

Resource -> Values -> strings.xml

<resources>
    <string name="app_name">Tutorial Drawer Menu</string>
    <string name="nav_open">Open</string>
    <string name="nav_close">Close</string>
</resources>

 Resource -> Menu -> my_menu.xml

<?xml version="1.0" encoding="utf-8"?>
<menu
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:android="http://schemas.android.com/apk/res/android">

    <item android:id="@+id/item_1" android:title="Item 1" />
    <item android:id="@+id/item_2" android:title="Item 2" />
</menu>

 Layout

activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<!-- androidx.drawerlayout.widget.DrawerLayout must be put on top of main layout -->
<androidx.drawerlayout.widget.DrawerLayout
    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="match_parent"
    tools:context=".MainActivity"
    android:orientation="vertical"
    android:id="@+id/my_drawerlayout"
    tools:openDrawer="start"
    android:fitsSystemWindows="true"
    >

    <!-- must have layout -->
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        >
        <!-- put androidx.appcompat.widget.Toolbar at the first of layout -->
        <androidx.appcompat.widget.Toolbar
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/my_toolbar"
            />

        <!-- PUT CONTENT HERE -->

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Hello World"
            />

        <!-- EXAMPLE FOR androidx.fragment.app.FragmentContainerView  add android:layout_weight="1" and android:gravity="top|left" -->

        <!-- lock adview position at bottom of layout -->
        <!-- Sample AdMob unit ID: ca-app-pub-3940256099942544/6300978111 -->
        <!-- AD Unit ID: ca-app-pub-0220748109202708/9185950681 -->
        <com.google.android.gms.ads.AdView
            android:id="@+id/adView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:adSize="BANNER"
            app:adUnitId="ca-app-pub-0220748109202708/9185950681"
            android:layout_gravity="end|center"
            />

    </LinearLayout>

    <!-- com.google.android.material.navigation.NavigationView must be put at the end of main layout -->
    <com.google.android.material.navigation.NavigationView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/my_navigationview"
        android:layout_gravity="start"
        android:fitsSystemWindows="true"
        app:menu="@menu/my_menu"
        />

</androidx.drawerlayout.widget.DrawerLayout>

MainActivity.java

package com.dedetok.tutordrawermenu;

import androidx.annotation.NonNull;
import androidx.appcompat.app.ActionBarDrawerToggle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.core.view.GravityCompat;
import androidx.drawerlayout.widget.DrawerLayout;
import android.os.Bundle;
import android.util.Log;
import android.view.MenuItem;

import com.google.android.material.navigation.NavigationView;

public class MainActivity extends AppCompatActivity {

    DrawerLayout myDrawerLayout;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        Toolbar myToolbar = findViewById(R.id.my_toolbar);
        setSupportActionBar(myToolbar); // android:theme="@style/Theme.AppCompat.Light.NoActionBar"

        myDrawerLayout = findViewById(R.id.my_drawerlayout);
        ActionBarDrawerToggle myActionBarDrawerToggle = new ActionBarDrawerToggle(this, myDrawerLayout, myToolbar, R.string.nav_open, R.string.nav_close);
        myDrawerLayout.addDrawerListener(myActionBarDrawerToggle);
        myActionBarDrawerToggle.syncState();

        NavigationView myNavigationView = findViewById(R.id.my_navigationview);
        myNavigationView.setNavigationItemSelectedListener(new NavigationView.OnNavigationItemSelectedListener() {
            @Override
            public boolean onNavigationItemSelected(@NonNull MenuItem item) {
                Log.e("dedetok", item.getTitle().toString());
                int idItem = item.getItemId();
                if (idItem==R.id.item_1) {
                    // Do something
                } else if (idItem==R.id.item_2) {
                    // Do something
                }
                if (myDrawerLayout.isDrawerOpen(GravityCompat.START)) {
                    myDrawerLayout.close();
                }
                return false;
            }
        });
    }

}

NOTE: Some code may reference to other source code in comment (some has modified to make it run), do not remove urls if you wish to copy paste code and use the code.

 

Sablon manual screen

Screen

Ukuran screen yang siap pakai

  1. 20x30
  2. 40x60
  3. lebih besar

Kerapatan screen

kerapatanmedia yang disablon
T35, T30, T36, T40
handuk, karung
T48, T54, T61, T62, T65, T77
kain, kaos
T90, T120
kayu, gelas
T150, T165, T180, T200 (200s)
kertas, plastik, stiker

Bahan afdruk screen

Obat afdruk 

  1. Diazol
  2. Rainbow
  3. Ulano
  4. Photazol
  5. TX-super
  6. Meta-X
  7. Bremol tex (cat water) / Bremol RN (cat minyak/plastisol)

Ulano

Afdruk Ulano

  1. oil resistence (untuk cat berbasis minyak/plastisol): Ulano 133, 569, FX88, QFX, DLX, QX1, QX3
  2. water resistence (untuk cat berbasis air): Ulano TZ, QTZ, QX5
  3. water & oil resistence: Ulano LX 660, LX758, LX 836, LX892

Fabric abrader,& de-greaser Ulano 3, Gel 23

Remover Ulano 4 (liquid) & Ulano 5 (pasta)

Fabric regeneartor Ulano 8

Screen filler Ulano 6

Hardener afdruk Ulano X

Bahan kimia lain

Bahan kimia lain untuk reducer (menghapus) screen

  1. soda api 1:1
  2. pregant paste 1:1
  3. reducer pvc
  4. natrium hipolorit

Tinta

Bedasarkan media sablon:

  1. kain
  2. kertas
  3. kayu, seng, triplex
  4. kulit, mika

Tool

Alat pendukung lainnya

  1. rakel
  2. meja sablon
  3. gelas, mangkuk, botol gelap, alat aduk (sendok plastik)
  4. kaca bening penekan negatif
  5. busa penyangga screen
  6. triplex untuk menekan busa ke screen

Penyablonan

  1. Desain gambar yang akan disablon dikertas tembus cahaya UV, Bila desain diceta di kertas HVS, gunakan minyak goreng bersih untuk mengolesi hasil print di kertas HVS. posisi gambar yang disablon mirror kiri kanan.
  2. Olesi screen dengan bahan afdruk secara merata dan tunggu kering 
  3. Susun screen dengan urutan paling atas
    1. kaca penjepit
    2. desain gambar
    3. screen
    4. busa
    5. triplex
  4. Sinari dibawah terik matahari +- 30 detik (tergantung kecerahan), lampu UV 40 watt selama 3-10 menit
  5. perbaiki negatif bila ada yang rusak
  6. siram dengan air panas dan semprot dengan air bersih


Referensi

  1. website: centralsps.co.id
  2. website: semua25.blogspot.com 
  3. website: oscas.co.id
  4. pdf "Teknik Dasar Cetak Sablon", Noor Fitrihana, ST & Widihastuti, M.Pd
  5. pdf "Teknik Pencelupan dan Pencapan untuk Sekolah Menengah Kejuruan Jilid 3", Sunarto, Direktorat Pembinaan Sekolah Menengah Kejuruan