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
| mContent = (EditText) v.findViewById(R.id.dialog_item_content_EditText); | |
| mContent.setText(mContentInit); | |
| mContent.setRawInputType(InputType.TYPE_CLASS_TEXT); | |
| mContent.setImeActionLabel(getResources().getString(R.string.done), EditorInfo.IME_ACTION_DONE); | |
| mContent.setImeOptions(EditorInfo.IME_ACTION_DONE); | |
| mContent.setOnEditorActionListener(new TextView.OnEditorActionListener() { | |
| @Override | |
| public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { | |
| if (event == null) { |
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 net.yanzm.profileapplication; | |
| import android.animation.Animator; | |
| import android.animation.AnimatorListenerAdapter; | |
| import android.animation.AnimatorSet; | |
| import android.animation.ObjectAnimator; | |
| import android.app.Activity; | |
| import android.app.FragmentManager; | |
| import android.content.Intent; | |
| import android.net.Uri; |
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 net.yanzm.profileapplication; | |
| import android.animation.Animator; | |
| import android.animation.AnimatorListenerAdapter; | |
| import android.animation.AnimatorSet; | |
| import android.animation.ObjectAnimator; | |
| import android.app.Activity; | |
| import android.app.AlertDialog; | |
| import android.content.DialogInterface; | |
| import android.content.Intent; |
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
| Unless specified otherwise, all of the below tinting applies to both Lollipop and pre-Lollipop using AppCompat v21. | |
| To use the support version of these attributes, remove the android namespace. | |
| For instance, "android:colorControlNormal" becomes "colorControlNormal". | |
| These attributes will be propagated to their corresponding attributes within the android namespace | |
| for devices running Lollipop. Any exceptions to this will be noted by including the "android:" prefix. | |
| All Clickable Views: | |
| ----------- |
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
| // status bar height | |
| int statusBarHeight = 0; | |
| int resourceId = getResources().getIdentifier("status_bar_height", "dimen", "android"); | |
| if (resourceId > 0) { | |
| statusBarHeight = getResources().getDimensionPixelSize(resourceId); | |
| } | |
| // action bar height | |
| int actionBarHeight = 0; | |
| final TypedArray styledAttributes = getActivity().getTheme().obtainStyledAttributes( |
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.support.v7.widget.LinearLayoutManager; | |
| import android.support.v7.widget.RecyclerView; | |
| public abstract class EndlessRecyclerOnScrollListener extends RecyclerView.OnScrollListener { | |
| public static String TAG = EndlessRecyclerOnScrollListener.class.getSimpleName(); | |
| private int previousTotal = 0; // The total number of items in the dataset after the last load | |
| private boolean loading = true; // True if we are still waiting for the last set of data to load. | |
| private int visibleThreshold = 5; // The minimum amount of items to have below your current scroll position before loading more. | |
| int firstVisibleItem, visibleItemCount, totalItemCount; |
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 java.util.ArrayList; | |
| import java.util.Arrays; | |
| import java.util.List; | |
| import rx.Observable; | |
| import rx.Observer; | |
| import rx.functions.Func2; | |
| public class RxJavaExamples { |
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 java.math.BigInteger; | |
| import java.security.PublicKey; | |
| import java.security.PrivateKey; | |
| import java.security.KeyFactory; | |
| import java.security.Security; | |
| import java.security.KeyPairGenerator; | |
| import java.security.KeyPair; | |
| import java.security.SecureRandom; | |
| import java.security.spec.PKCS8EncodedKeySpec; | |
| import java.security.spec.ECGenParameterSpec; |
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
| Tried to follow the naming conventions as mentioned in | |
| http://android-developers.blogspot.com/2013/08/actionbarcompat-and-io-2013-app-source.html | |
| res/values/styles.xml | |
| <resources> | |
| <style name="Theme.Styled" parent="@style/Theme.AppCompat.Light"> | |
| <item name="actionBarStyle">@style/Widget.Styled.ActionBar</item> | |
| </style> |