Define a custom class extending SeekBar to show the progress text on thumb of SeekBar.
public class TextThumbSeekBar extends SeekBar {
private int mThumbSize;
private TextPaint mTextPaint;
public TextThumbSeekBar(Context context) {
cal | grep --before-context 6 --after-context 6 --color -e " $(date +%e)" -e "^$(date +%e)" |
import android.graphics.*; | |
import com.squareup.picasso.Transformation; | |
/** | |
* Transforms an image into a circle representation. Such as a avatar. | |
*/ | |
public class CircularTransformation implements Transformation | |
{ | |
int radius = 10; |
/** | |
** ______ _ _____ _ _ _ | |
** | _ \ | | / ___| | | (_) | | | |
** | | | |__ _ _ __| | __ \ `--. ___ | | __ _ _ __ _ _______ __| | | |
** | | | / _` | '__| |/ / `--. \/ _ \| |/ _` | '__| |_ / _ \/ _` | | |
** | |/ / (_| | | | < /\__/ / (_) | | (_| | | | |/ / __/ (_| | | |
** |___/ \__,_|_| |_|\_\ \____/ \___/|_|\__,_|_| |_/___\___|\__,_| | |
** | |
** Quassel Theme | |
** |
def toCamelCase(String string) { | |
String result = "" | |
string.findAll("[^\\W]+") { String word -> | |
result += word.capitalize() | |
} | |
return result | |
} | |
afterEvaluate { project -> | |
Configuration runtimeConfiguration = project.configurations.getByName('compile') |
So, what is crosswalk and why do I care? Take a look at the website: https://crosswalk-project.org/
CrossWalk is a HTML5 runtime, you can use it to create HTML5 applications with 'native features' You can use CrossWalk to create HTML5-only applications for Android (x86 and arm architectures) and Tizen but you can also use CrossWalk as a View within an android project.
This means you can replace Android WebView with XWalkView and get some extra features like:
# Prevent the Xamarin.Android bindings generator from converting a `get` or `set` method to a property | |
Xamarin.Android Java bindings projects will by default automatically bind any Java method that starts with "get" to be the getter of a C# property. To prevent this in specific cases, you can set the `propertyName` attribute of the method to the empty string. The same is true for methods that start with "set", except that they will only be converted to property setters if there is already a corresponding property getter. This requirement prevents the creation of set-only properties (see also http://msdn.microsoft.com/en-us/library/ms229006.aspx). | |
So for example, you would add something like the following to the Metadata.xml file: | |
``` | |
<attr path="/api/package[@name='com.example.testandroidlib']/class[@name='MyClass']/method[@name='getNumberTen']" name="propertyName"></attr> | |
``` |
/* | |
* Copyright (C) 2006 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
#!/bin/bash | |
# Android 4.3+ changes app's internal directory permissions and you can not just pull your | |
# databases to your computer, so I did this as a workaround to extract my databases. | |
# I only use it for debug, use it under your responsability. | |
package=$1 | |
db_name=$2 | |
path="/data/data/$package/" |
package com.cyrilmottier.android.resourcesadditions; | |
import android.content.res.Resources; | |
import android.content.res.XmlResourceParser; | |
import android.os.Bundle; | |
import org.xmlpull.v1.XmlPullParser; | |
import org.xmlpull.v1.XmlPullParserException; | |
/** | |
* @author Cyril Mottier |