Skip to content

Instantly share code, notes, and snippets.

View wuyexiong's full-sized avatar

哈哈熊仔 wuyexiong

  • Shenzhen, China
View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="config_app_name">AVélib</string>
<string name="config_authority">com.cyrilmottier.android.avelib.citybikes</string>
<string name="config_com.google.android.maps.v2.api_key">XXX</string>
</resources>
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<!--
Checkstyle-Configuration: Android checkstyle by Enea
Description: none
-->
/*
** Copyright 2012, Joel Pedraza
**
** 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
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
public class FragmentUtils {
/**
* @param frag
* The Fragment whose parent is to be found
* @param callbackInterface
* The interface class that the parent should implement
* @return The parent of frag that implements the callbackInterface or null
public class NetworkButton extends Button {
// See Otto's sample application for how BusProvider works. Any mechanism
// for getting a singleton instance will work.
Bus bus = BusProvider.get();
public NetworkButton(Context context, AttributeSet attrs) {
super(context, attrs);
}