TODO: Write a project description
TODO: Describe the installation process
package com.mindstorm.famousquotesandroid; | |
import android.accounts.AccountManager; | |
import android.app.Activity; | |
import android.app.ProgressDialog; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.SharedPreferences; | |
import android.os.AsyncTask; | |
import android.os.Bundle; |
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<!-- google's material design colours from | |
http://www.google.com/design/spec/style/color.html#color-ui-color-palette --> | |
<!--reds--> | |
<color name="md_red_50">#FFEBEE</color> | |
<color name="md_red_100">#FFCDD2</color> | |
<color name="md_red_200">#EF9A9A</color> |
/** | |
* Author: Ian Gallagher <igallagher@securityinnovation.com> | |
* | |
* This code utilizes jBCrypt, which you need installed to use. | |
* jBCrypt: http://www.mindrot.org/projects/jBCrypt/ | |
*/ | |
public class Password { | |
// Define the BCrypt workload to use when generating password hashes. 10-31 is a valid value. | |
private static int workload = 12; |
public class AppengineFirebaseAuth { | |
private static final String APP_ID = "YOUR_APP_ID"; | |
public static AppengineFirebaseToken verifyIdToken(String token) { | |
Map<String, String> publicKeys = GooglePublicKeys.getKeys(); | |
for (String kid : publicKeys.keySet()) { | |
String publicKey = publicKeys.get(kid); |
1) ListView=>Use android:cacheColorHint=”@android:color/transparent” to avoid black highlighting while Scrolling. | |
2) To resolve this issue “Failed to install *.apk on device timeout Launch canceled! , increase ADB connection timeout | |
3) use setError() to display error message for your EditText | |
4) To Block the default animation for startActivity() For ex: myIntent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION); | |
5) Android Action Bar Style Generator http://jgilfelt.github.com/android-actionbarstylegenerator | |
6) create library with reusable code and reference it in future projects. | |
7) Don’t use right-pointing carets on line items http://developer.android.com/design/media/migrating_ios_settings.png | |
8) 10 amazing Android development tips http://www.netmagazine.com/features/10-amazing-android-development-tips | |
9) Define these attributes for displaying multiline EditText => android:singleLine=”false”, android:lines=”5″ | |
10) Follow Dashboard design pattern. Easy to implement and handle Navigation. |
RecyclerView
does not have an OnItemClickListener like it's predecessor, ListView
. However, detecting item clicks is pretty simple.
Set an OnClickListener
in your ViewHolder
creation:
private class MyAdapter extends RecyclerView.Adapter<MyAdapter.ViewHolder> {
public static class ViewHolder extends RecyclerView.ViewHolder
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.cards.notification"> | |
<uses-sdk | |
android:minSdkVersion="17" | |
android:targetSdkVersion="17" /> | |
<application | |
android:allowBackup="true" |
/* | |
* Copyright 2012 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 |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |