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
| private BadgeView mBadgeView; | |
| @Override | |
| public boolean onCreateOptionsMenu(Menu menu) { | |
| getSupportMenuInflater().inflate(R.menu.badge_demo, menu); | |
| MenuItem menuItem = menu.findItem(R.id.item_id); | |
| ImageButton iconView = new ImageButton(this, null, | |
| com.actionbarsherlock.R.style.Widget_Sherlock_ActionButton); | |
| iconView.setImageDrawable(menuItem.getIcon()); |
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.cyrilmottier.android.citybikes.provider; | |
| import android.net.Uri; | |
| import com.cyrilmottier.android.avelov.BuildConfig; | |
| /** | |
| * @author Cyril Mottier | |
| */ | |
| public class CityBikesContract { |
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.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 |
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.support.v4.preference; | |
| import java.lang.reflect.Constructor; | |
| import java.lang.reflect.Method; | |
| import android.annotation.SuppressLint; | |
| import android.app.Activity; | |
| import android.content.Context; | |
| import android.content.Intent; | |
| import android.os.Build; |
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
| /* | |
| * Copyright (C) 2013 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 |
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 Dexter { | |
| private static String optimizedDirectory = "optimized"; | |
| private static String workDirectory = "working"; | |
| public static void loadFromAssets(Context context, String fileName) throws Exception { | |
| File optimized = new File(optimizedDirectory); | |
| optimized = context.getDir(optimized.toString(), Context.MODE_PRIVATE); | |
| optimized = new File(optimized, fileName); |
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
| android { | |
| def gitTag = { | |
| def tagMatchOptions | |
| try { | |
| tagMatchOptions = "--match ${tagToBuildFrom}" | |
| } catch (MissingPropertyException) { | |
| tagMatchOptions = "" | |
| } | |
| "git describe --exact HEAD ${tagMatchOptions}".execute().text.trim() | |
| }() |
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
| android { | |
| signingConfigs { | |
| release | |
| } | |
| buildTypes { | |
| release { | |
| signingConfig signingConfigs.release | |
| } |
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
| /* | |
| * Copyright 2013 Google Inc. | |
| * | |
| * 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 |