This file contains 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 Foo{ | |
private long id; | |
private int order; | |
private String name; | |
/*** | |
* Simple constructor | |
***/ | |
public Foo(){ | |
this.id = 1; |
This file contains 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)2012 Poohdish Rattanavijai | |
* | |
* 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 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
/** | |
* Retrieve navigation data set from either remote URL or String | |
* @param url | |
* @return navigation set | |
*/ | |
public static NavigationDataSet GetNavigationDataSet(String url) { | |
NavigationDataSet navigationDataSet = null; | |
try | |
{ |
This file contains 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
/** | |
* Retrieve navigation data set from either remote URL or String | |
* @param url | |
* @return navigation set | |
*/ | |
public static NavigationDataSet GetNavigationDataSet(String url) { | |
NavigationDataSet navigationDataSet = null; | |
try | |
{ |
This file contains 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)2012 Poohdish Rattanavijai | |
* | |
* 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 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
/** | |
* Update single item inside {@link ListView}. | |
* @param target {@link Object} object to update view. | |
*/ | |
private void refreshListItem(Object target){ | |
ListView list = getListView(); | |
// Find position of the first visible row | |
int start = list.getFirstVisiblePosition(); | |
// Find position of the last visible row | |
int end = list.getLastVisiblePosition(); |
This file contains 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 this method to compare if the latest version is newer than current version or not. | |
* @param currentVersion current version | |
* @param latestVersion latest version | |
* @return true if newer | |
*/ | |
public boolean isNewerVersion(String currentVersion, String latestVersion){ | |
boolean result = false; |
This file contains 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
/** | |
* Called by the system every time a client explicitly starts the service by calling | |
* {@link android.content.Context#startService}, providing the arguments it supplied and a | |
* unique integer token representing the start request. Do not call this method directly. | |
* | |
* <p>For backwards compatibility, the default implementation calls | |
* {@link #onStart} and returns either {@link #START_STICKY} | |
* or {@link #START_STICKY_COMPATIBILITY}. | |
* | |
* <p>If you need your application to run on platform versions prior to API |
This file contains 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
01-08 10:41:37.473 8095-8095/? E/AndroidRuntime﹕ FATAL EXCEPTION: main | |
java.lang.RuntimeException: Unable to instantiate instrumentation ComponentInfo{com.app.dealfish.main/com.google.android.apps.common.testing.testrunner.GoogleInstrumentationTestRunner}: java.lang.ClassNotFoundException: Didn't find class "com.google.android.apps.common.testing.testrunner.GoogleInstrumentationTestRunner" on path: /system/framework/android.test.runner.jar:/data/app/com.app.dealfish.main-1.apk:/data/app/com.app.dealfish.main-1.apk | |
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4333) | |
at android.app.ActivityThread.access$1300(ActivityThread.java:141) | |
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1294) | |
at android.os.Handler.dispatchMessage(Handler.java:99) | |
at android.os.Looper.loop(Looper.java:137) | |
at android.app.ActivityThread.main(ActivityThread.java:5041) | |
at java.lang.reflect.Method.invokeNat |
OlderNewer