This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#set( $AwesomeName = "Süleyman SEZER" ) | |
#set( $AwesomeMail = "me.iamcodder@gmail.com" ) | |
/** Code with ❤ | |
╔════════════════════════════╗ | |
║ Created by ${AwesomeName} ║ | |
╠════════════════════════════╣ | |
║ ${AwesomeMail} ║ | |
╠════════════════════════════╣ | |
║ ${DAY}/${MONTH}/${YEAR} - ${TIME} ║ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Atom --> $ git config --global core.editor "atom --wait" | |
nano --> $ git config --global core.editor "nano -w" | |
Text Wrangler --> $ git config --global core.editor "edit -w" | |
Sublime Text (Mac) --> $ git config --global core.editor "subl -n -w" | |
Sublime Text (Win, 32-bit install) --> $ git config --global core.editor "'c:/program files (x86)/sublime text 3/sublime_text.exe' -w" | |
Sublime Text (Win, 64-bit install) --> $ git config --global core.editor "'c:/program files/sublime text 3/sublime_text.exe' -w" | |
Notepad++ (Win) --> $ git config --global core.editor "'c:/program files (x86)/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin" | |
Kate (Linux) --> $ git config --global core.editor "kate" | |
Gedit (Linux) --> $ git config --global core.editor "gedit -s -w" | |
VS Code --> $ git config --global core.editor "code --wait" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Many Ways for setting Click | |
1) Pass handler to binding. | |
ActivityMainBinding binding = DataBindingUtil.setContentView(this,R.layout.activity_main); | |
Hander handler = new Handler(); | |
binding.setHandlers(handlers); | |
2) Set clicks (use any of below) | |
a) android:onClick="@{handler::onClickMethodReference}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.regex.Pattern | |
fun String.isEmailValid(): Boolean { | |
val expression = "^[\\w.-]+@([\\w\\-]+\\.)+[A-Z]{2,8}$" | |
val pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE) | |
val matcher = pattern.matcher(this) | |
return matcher.matches() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CustomTimer { | |
private var ikiSaniye = object : CountDownTimer( | |
GameTimer.TWO_SECOND.getTimer(), | |
GameTimer.ONE_SECOND.getTimer() | |
) { | |
override fun onFinish() { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style name="Theme.AppCompat.Transparent.NoActionBar" parent="Theme.AppCompat.Light.NoActionBar"> | |
<item name="android:windowIsTranslucent">true</item> | |
<item name="android:windowBackground">@android:color/transparent</item> | |
<item name="android:windowContentOverlay">@null</item> | |
<item name="android:windowNoTitle">true</item> | |
<item name="android:backgroundDimEnabled">true</item> | |
</style> | |
Xml activity -> android:theme="@style/Theme.AppCompat.Transparent.NoActionBar" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
infix fun Activity.extStatusBarColor(color:String){ | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { | |
val window: Window = this.window | |
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); | |
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); | |
window.statusBarColor = Color.parseColor(color) | |
} | |
} | |
this extStatusBarColor "#FFFFFF" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Theme : | |
<item name="android:windowTranslucentStatus" tools:targetApi="kitkat">true</item> | |
<item name="android:windowTranslucentNavigation" tools:targetApi="kitkat">true</item> | |
Xml : | |
android:fitsSystemWindows="true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
environment: | |
sdk: ">=2.7.0 <3.0.0" | |
Private extension (only used in class): | |
extension on Banana { | |
// ... | |
} | |
Public extension: | |
extension BananaExtension on Banana { |
OlderNewer