This repository learns about how to create a about. about example is taken from the "Republic of Telesandi" Application project
indonesia : repositori ini mempelajari tentang cara membuat sebuah about. contoh about di ambil dari projek Aplikasi "Republic of Telesandi"
here I create 2 examples in the form about dialog and about activity || disini saya membuat 2 contoh dalam bentuk about dialog dan about activity
- How to make Bar Transparant || Cara Membuat bar menjadi transparan
- Kotlin (put code in onCreate below setContentView || taro kode ini dibawah setContentView)
if(Build.VERSION.SDK_INT>=21){window.decorView.systemUiVisibility=View.SYSTEM_UI_FLAG_LAYOUT_STABLEorView.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN}changeStatusBarColor()}privatefunchangeStatusBarColor(){if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.LOLLIPOP){valwindow=windowwindow.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)window.statusBarColor=Color.TRANSPARENT}- Java (put code in OnCreate below setContentView || taro kode ini dibawah setContentView)
if(Build.VERSION.SDK_INT>=21){getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE|View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);}changeStatusBarColor();}privatevoidchangeStatusBarColor(){if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.LOLLIPOP){Windowwindow=getWindow();window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);window.setStatusBarColor(Color.TRANSPARENT);}- Setting Font
- Java
TextViewteks1,teks2;teks1=(TextView)findViewById(R.id.txtTentang);Typefacetampilan=Typeface.createFromAsset(getAssets(),"fonts/Back-to-School.ttf");teks1.setTypeface(tampilan);}- Kotlin
val teks1: TextViewval teks2: TextViewteks1=findViewById<View>(R.id.txtTentang)asTextViewvaltampilan=Typeface.createFromAsset(assets,"fonts/Back-to-School.ttf")teks1.typeface=tampilan}- Configure Dialog
- Kotlin
privatefuntentang(){AlertDialog.Builder(this).setTitle(R.string.title)orsetTitle("title").setMessage(R.string.message)orsetTitle("message").setPositiveButton("OK"){dialoginterface,i->}.show()}- Java
privatevoidtentang(){newAlertDialog.Builder(this).setTitle(R.string.title)orsetTitle("title").setMessage(R.string.message)orsetTitle("message").setPositiveButton("OK",newDialogInterface.OnClickListener(){publicvoidonClick(DialogInterfacedialoginterface,inti){}}).show();}- Configure build.gradl (Module: app) --> Optional
implementation'com.flaviofaria:kenburnsview:1.0.7'implementation'com.daimajia.easing:library:1.0.1@aar'*please wait, output in gif || tunggu sebentar, output dalam gif
