This file contains hidden or 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
package com.example.a557114.materialbutton; | |
import android.app.Activity; | |
import android.graphics.Color; | |
import android.graphics.drawable.ColorDrawable; | |
import android.os.Bundle; | |
import android.view.Menu; | |
import android.view.MenuItem; | |
This file contains hidden or 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
<resources> | |
<!-- Default screen margins, per the Android Design guidelines. --> | |
<dimen name="activity_horizontal_margin">16dp</dimen> | |
<dimen name="activity_vertical_margin">16dp</dimen> | |
<!-- http://developer.android.com/design/style/metrics-grids.html --> | |
<dimen name="gapSmall">4dp</dimen> | |
<dimen name="gapMedium">8dp</dimen> | |
<dimen name="gapLarge">16dp</dimen> | |
<dimen name="gapXLarge">32dp</dimen> |
This file contains hidden or 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
package com.tempos21.bluekiwi.ui.view; | |
import android.content.Context; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Paint; | |
import android.graphics.Rect; | |
import android.util.AttributeSet; | |
import android.view.Gravity; | |
import android.widget.TextView; |
This file contains hidden or 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
int enabled = PackageManager.COMPONENT_ENABLED_STATE_ENABLED; | |
int disabled = PackageManager.COMPONENT_ENABLED_STATE_DISABLED; | |
ComponentName component = new ComponentName(context, | |
Interceptor.class); | |
context.getPackageManager().setComponentEnabledSetting(component, disabled, | |
PackageManager.DONT_KILL_APP); | |
context.startActivity(intent); |
This file contains hidden or 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
InputMethodManager imm = (InputMethodManager)getSystemService( | |
Context.INPUT_METHOD_SERVICE); | |
imm.hideSoftInputFromWindow(searchEdit.getWindowToken(), 0); |
This file contains hidden or 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
package android.widget; | |
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.os.Build; | |
import android.util.AttributeSet; | |
import android.view.View; | |
import com.alorma.github.R; |
This file contains hidden or 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
public class CircleDrawable extends StateListDrawable { | |
public CircleDrawable() { | |
int stateFocused = android.R.attr.state_focused; | |
int statePressed = android.R.attr.state_pressed; | |
int stateSelected = android.R.attr.state_selected; | |
int stateDisabled = -android.R.attr.state_enabled; | |
int selectedColor = ColorHelper.getHexColorTransparent(getActivity(), "a4"); | |
addState(new int[]{stateSelected}, new CircleShape(selectedColor)); |
This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or 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
#!/bin/bash | |
# Shows branches with descriptions | |
branches=$(git for-each-ref --format='%(refname)' refs/heads/ | sed 's|refs/heads/||') | |
for branch in $branches; do | |
last_used=$(git show --pretty=format:"%Cgreen%cr%Creset" $branch | head -1) | |
desc=$(git config branch.$branch.description) | |
if [ $branch == $(git rev-parse --abbrev-ref HEAD) ]; then | |
branch="*\t$last_used\t\033[0;32m$branch\033[0m" | |
else |
This file contains hidden or 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
package mt.bnpp.com.bnpp_mt_android_bleu.utils; | |
import android.text.InputFilter; | |
import android.text.Spanned; | |
/** | |
* Created by A591108 on 05/11/2014. | |
*/ | |
public class DecimalFilter implements InputFilter { |