Skip to content

Instantly share code, notes, and snippets.

View aykuttasil's full-sized avatar
🏍️

Aykut Asil aykuttasil

🏍️
View GitHub Profile
public class Circle extends View {
private static final int START_ANGLE_POINT = 90;
private final Paint paint;
private final RectF rect;
private float angle;
public Circle(Context context, AttributeSet attrs) {
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.Transparent" parent="android:Theme">
<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:windowIsFloating">true</item>
<item name="android:backgroundDimEnabled">false</item>
</style>
<activity
android:name=".DetailActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSER" />
<data
android:scheme="http"
android:host="myapp.com"/>
@aykuttasil
aykuttasil / Activity.java
Created October 28, 2016 07:38
From http://stackoverflow.com/questions/17788362/how-to-start-an-activity-when-a-link-is-clicked-in-webview WebView içerisinde ki bir linke tıklandığında custom yönlendirme
public class MyWebViewClient extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if (url.equals("YOURLINK")) {
Intent intent = new Intent(getContext(), YourActivity.class);
startActivity(intent);
return true; // Handle By application itself
} else {
view.loadUrl(url);
return true;
{
"latestVersion": "6",
"latestVersionCode": 6,
"url": "https://re.aktif.com",
"releaseNotes": [
"- First evolution",
"- Second evolution",
"- Bug fixes"
]
}
@aykuttasil
aykuttasil / BaseCallback.java
Created September 11, 2017 21:38
Retrofit ProgressCallBack
public abstract class OlevCallback<T> extends Callback<T> {
AlertDialog dialog;
public OlevCallback(Context context) {
super(context);
}
public OlevCallback(Callback<T> chain, Context context) {
super(chain, context);
@aykuttasil
aykuttasil / DateUtils.java
Created September 11, 2017 22:09
DateTimeUtils
public class DateUtils {
private static final String JUST_NOW = "Şimdi";
private static final String MINUTES = " dakika";
private static final String HOURS = " saat";
private static final String H = "s";
private static final String AGO = " önce";
private static final String YESTERDAY = "Dün";
public static boolean isSameDay(Long timestamp) {
@aykuttasil
aykuttasil / sample.java
Created September 15, 2017 02:01
Scroll to down ScrollView
scrollView.post(new Runnable() {
@Override
public void run() {
scrollView.fullScroll(ScrollView.FOCUS_DOWN);
}
});
@aykuttasil
aykuttasil / bash script
Created September 15, 2017 23:17
sha256
keytool -list -v -keystore my-release-key.keystore (~/.adnroid/debug.keystore)
@aykuttasil
aykuttasil / macos command.txt
Created September 16, 2017 06:57
MacOS Command
-----
-> Apple gizli dosyaları gösterme komutu
defaults write com.apple.finder AppleShowAllFiles YES; killall -HUP Finder
-----
-> Screen Shot
Cmd + Shift + 3 - 4
————-
-> Wireless Key