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
| import android.util.Base64; | |
| import java.nio.charset.StandardCharsets; | |
| import java.security.InvalidKeyException; | |
| import java.security.KeyFactory; | |
| import java.security.KeyPair; | |
| import java.security.KeyPairGenerator; | |
| import java.security.NoSuchAlgorithmException; | |
| import java.security.PrivateKey; | |
| import java.security.PublicKey; |
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
| git init | |
| git clone [repository url] | |
| git remote add origin [repository url] | |
| touch .gitignore | |
| git add [path to file] |
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
| import android.app.Activity; | |
| import android.content.Context; | |
| import android.content.Intent; | |
| import android.content.pm.ResolveInfo; | |
| import android.content.res.AssetFileDescriptor; | |
| import android.database.Cursor; | |
| import android.graphics.Bitmap; | |
| import android.graphics.BitmapFactory; | |
| import android.graphics.Matrix; | |
| import android.media.ExifInterface; |
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 DBConstants { | |
| // word table | |
| public static final String TABLE_WORD = "word_table"; | |
| public static final String KEY_WORD = "word"; | |
| public static final String KEY_ID = "word_id"; | |
| } |
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 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) |
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.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 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 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 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 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 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 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 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 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); | |
| } |
NewerOlder