Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/poncoe/rot_about
This repository learns about how to create a about. about example is taken from the "Republic of Telesandi" Application project || repositori ini mempelajari tentang cara membuat sebuah about. contoh about di ambil dari projek Aplikasi "Republic of Telesandi"
https://github.com/poncoe/rot_about
activity android android-ui androidstudio dialog dialog-box kotlin-android
Last synced: 8 days ago
JSON representation
This repository learns about how to create a about. about example is taken from the "Republic of Telesandi" Application project || repositori ini mempelajari tentang cara membuat sebuah about. contoh about di ambil dari projek Aplikasi "Republic of Telesandi"
- Host: GitHub
- URL: https://github.com/poncoe/rot_about
- Owner: poncoe
- Created: 2018-01-10T11:41:49.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-10T12:14:58.000Z (almost 7 years ago)
- Last Synced: 2024-11-07T08:47:06.287Z (about 2 months ago)
- Topics: activity, android, android-ui, androidstudio, dialog, dialog-box, kotlin-android
- Language: Java
- Homepage: https://play.google.com/store/apps/details?id=id.syntaxtelesandi.telesandiproject
- Size: 7.06 MB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rot_about
This repository learns about how to create a about. about example is taken from the "Republic of Telesandi" Application projectindonesia :
repositori ini mempelajari tentang cara membuat sebuah about. contoh about di ambil dari projek Aplikasi "Republic of Telesandi"# How To Build
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
1. How to make Bar Transparant || Cara Membuat bar menjadi transparan
- Kotlin (put code in onCreate below setContentView || taro kode ini dibawah setContentView)
```javascript
if (Build.VERSION.SDK_INT >= 21) {
window.decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_STABLE or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
}changeStatusBarColor()
}
private fun changeStatusBarColor() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
val window = window
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
window.statusBarColor = Color.TRANSPARENT
}
```
- Java (put code in OnCreate below setContentView || taro kode ini dibawah setContentView)```javascript
if (Build.VERSION.SDK_INT >= 21) {
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
}changeStatusBarColor();
}
private void changeStatusBarColor() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Window window = getWindow();
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
window.setStatusBarColor(Color.TRANSPARENT);
}```
2. Setting Font
- Java
```javascript
TextView teks1,teks2;
teks1=(TextView)findViewById(R.id.txtTentang);
Typeface tampilan= Typeface.createFromAsset(getAssets(), "fonts/Back-to-School.ttf");
teks1.setTypeface(tampilan);
}```
- Kotlin
```javascript
val teks1: TextView
val teks2: TextViewteks1 = findViewById(R.id.txtTentang) as TextView
val tampilan = Typeface.createFromAsset(assets, "fonts/Back-to-School.ttf")
teks1.typeface = tampilan
}```
3. Configure Dialog
- Kotlin
```javascript
private fun tentang() {
AlertDialog.Builder(this).setTitle(R.string.title) or setTitle("title")
.setMessage(R.string.message) or setTitle("message")
.setPositiveButton("OK") { dialoginterface, i -> }.show()}
```
- Java
```javascript
private void tentang() {
new AlertDialog.Builder(this).setTitle(R.string.title) or setTitle("title")
.setMessage(R.string.message) or setTitle("message")
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialoginterface, int i) {
}
}).show();}
```
4. Configure build.gradl (Module: app) --> Optional
```javascript
implementation 'com.flaviofaria:kenburnsview:1.0.7'
implementation 'com.daimajia.easing:library:1.0.1@aar'
```# Output
*please wait, output in gif || tunggu sebentar, output dalam gif![alt text](https://github.com/kataponcoe/rot_about/blob/master/screenshoot/about.gif?raw=true)