Skip to content

Instantly share code, notes, and snippets.

View lucamtudor's full-sized avatar

Tudor Luca lucamtudor

View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.trifork.example"
android:installLocation="auto"
android:versionName="@string/client_info" >
<!-- ... -->
<application
android:hardwareAccelerated="true"
/*
* 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
@lucamtudor
lucamtudor / ViewServer.java
Created July 2, 2013 10:24
This class can be used to enable the use of HierarchyViewer inside an * application. HierarchyViewer is an Android SDK tool that can be used to * inspect and debug the user interface of running applications. For security * reasons, HierarchyViewer does not work on production builds (for instance * phones bought in store.) By using this class, yo…
/*
* Copyright (C) 2011 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 distributed under the License is
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
@lucamtudor
lucamtudor / Config.java
Created July 2, 2013 10:19
Helper methods that make logging more consistent throughout the application.
public class Config {
public static final boolean DEBUG = true;
}
@lucamtudor
lucamtudor / ImageHelper.java
Created July 2, 2013 10:14
ImageHelper that has the following features: - getRoundedCornerBitmap() : Create a round shape cropped Bitmap from an existing Bitmap. - decodeUri() : Obtains an image at a specified Uri.
/**
* @author Tudor Luca
*/
public class ImageHelper {
public static class Options {
/**
* If not set, the source Bitmap width will be used.
*/
@lucamtudor
lucamtudor / AndroidManifest.xml
Created July 2, 2013 10:00
Method to check if the Android device is connected to the Internet.
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />