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
<?xml version="1.0" encoding="utf-8"?> | |
<vector xmlns:android="http://schemas.android.com/apk/res/android" | |
android:width="24dp" | |
android:height="24dp" | |
android:viewportHeight="24.0" | |
android:viewportWidth="24.0"> | |
<path | |
android:fillColor="#FF000000" | |
android:pathData="M12,4.5C7,4.5 2.73,7.61 1,12c1.73,4.39 6,7.5 11,7.5s9.27,-3.11 11,-7.5c-1.73,-4.39 -6,-7.5 -11,-7.5zM12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5zm0,-8c-1.66,0 -3,1.34 -3,3s1.34,3 3,3 3,-1.34 3,-3 -1.34,-3 -3,-3z" /> | |
</vector> |
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 void upgradeTable(SQLiteDatabase db) { | |
MyTableHandler mth = new MyTableHandler(); | |
mth.createTable(db); | |
ArrayList<String> columns = getColumns(db, TABLE_NAME); | |
String alterQuery = "ALTER TABLE " + TABLE_NAME + " RENAME TO temp_" + TABLE_NAME; | |
db.execSQL(alterQuery); | |
mth.createTable(db); | |
columns.retainAll(DatabaseHandler.getColumns(db, TABLE_NAME)); |
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 BeaconProductHandler extends SQLiteHelper { | |
public static final String TABLE_BEACON_PRODUCT = "BEACON_PRODUCT_TABLE"; | |
// beacon product table column names | |
public static final String key_uid = "uid"; | |
public static final String key_uuid = "uuid"; | |
public static final String key_major_value = "major_value"; | |
public static final String key_minor_value = "minor_value"; | |
public static final String key_name = "name"; |
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 Soap { | |
private static String BASE_URL_API = General.BASE_URL + "api/"; | |
private static final String CHARSET = "UTF-8"; | |
private static final String RESULT_OK = "200"; | |
private static final String TAG = Soap.class.getSimpleName(); | |
public static String getSoapResponsePost(String requestURL, Uri.Builder postDataParams) { | |
URL url; | |
String response = ""; |
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 CommentAdapter extends BaseAdapter { | |
private ArrayList<Comment> arrComments; | |
private Context mContext; | |
SharedPreferences mPrefs; | |
public CommentAdapter(Context mContext, ArrayList<Comment> arrComments) { | |
this.mContext = mContext; | |
this.arrComments = arrComments; | |
this.mPrefs = PreferenceManager.getDefaultSharedPreferences(this.mContext); | |
} |
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 SettingsAdapter extends WearableListView.Adapter { | |
private final Context context; | |
private final List<SettingsItems> items; | |
public SettingsAdapter(Context context, List<SettingsItems> items) { | |
this.context = context; | |
this.items = items; | |
} |
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 DBUtils { | |
public static ArrayList<String> getColumns(SQLiteDatabase db, String tableName) { | |
ArrayList<String> al = null; | |
Cursor c = null; | |
try { | |
c = db.rawQuery("SELECT * FROM " + tableName + " LIMIT 1", null); | |
if (c != null) { | |
al = new ArrayList<>(Arrays.asList(c.getColumnNames())); | |
} |
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 RobotoTextView extends TextView { | |
public static final String ANDROID_SCHEMA = "http://schemas.android.com/apk/res/android"; | |
private static HashMap<String, Typeface> fontCache = new HashMap<>(); | |
public RobotoTextView(Context context, AttributeSet attrs) { | |
super(context, attrs); | |
applyCustomFont(context, attrs); |
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
package com.rv; | |
import android.os.Bundle; | |
import android.support.v7.app.AppCompatActivity; | |
import android.support.v7.widget.LinearLayoutManager; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.View; | |
import android.widget.Toast; | |
import java.util.ArrayList; |
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 Soap { | |
private static final String BASE_URL = "base_url"; | |
private static String RESULT_OK = "200"; | |
private static String getAbsiluteURL(String postFixUrl) { | |
return BASE_URL + postFixUrl; | |
} | |
private static String getConnectionErrorResponse(Context context) |
OlderNewer