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 TextViewWithFont extends TextView { | |
private Context mContext; | |
private String mFont; | |
public TextViewWithFont(Context context) { | |
super(context, null); | |
mContext = context; | |
init(); | |
} |
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
<FrameLayout ...> | |
<ImageView | |
android:id="@+id/imgBg" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:scaleType="centerCrop" | |
android:src="@drawable/baking"/> | |
<ScrollView |
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
import com.android.volley.AuthFailureError; | |
import com.android.volley.NetworkResponse; | |
import com.android.volley.Request; | |
import com.android.volley.Response; | |
import com.android.volley.VolleyLog; | |
import com.android.volley.toolbox.HttpHeaderParser; | |
import java.io.ByteArrayOutputStream; | |
import java.io.IOException; | |
import java.io.UnsupportedEncodingException; |
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
import android.content.Context; | |
import android.util.AttributeSet; | |
import android.widget.LinearLayout; | |
public class SquareLinearLayout extends LinearLayout { | |
public SquareLinearLayout(Context context, AttributeSet attrs) { | |
super(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
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Paint; | |
import android.graphics.Rect; | |
import android.graphics.Typeface; | |
import android.util.AttributeSet; | |
import android.view.View; |
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
import android.content.Context; | |
import android.content.pm.PackageInfo; | |
import android.content.pm.PackageManager; | |
import android.os.Build; | |
import android.os.Parcel; | |
import android.os.Parcelable; | |
import android.text.TextUtils; | |
import com.facebook.android.crypto.keychain.SharedPrefsBackedKeyChain; | |
import com.facebook.crypto.Crypto; |
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
<android.support.design.widget.CoordinatorLayout> | |
<ImageView | |
android:id="@+id/imgBgBlur" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_marginTop="@dimen/app_bar_height" | |
android:scaleType="matrix" | |
android:visibility="visible" /> |
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
/** | |
* Returns the difference between the provided date and now. | |
* The difference is in actual calendar days rather than time difference based. | |
* This means 01/Jan/2015 23:50 and 02/Jan/2015 00:01AM has a difference of 1 day. | |
* | |
* @param date The date from which the difference to today has to be calculated. | |
* @return difference in calendar days. | |
*/ | |
public static int getRealDayDifference(Date date) { | |
String timeString = null; |
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
HttpClient client = sslHttpStack.getmHttpClient(); | |
HttpEntityEnclosingRequestBase entityRequest; | |
entityRequest = new HttpPost("http://my-server.com.au/my-api/customer/data"); | |
MultipartEntityBuilder entityBuilder = MultipartEntityBuilder.create(); | |
entityBuilder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE); | |
entityBuilder.addTextBody("someparameter", params.toString()); //params in this case is a JSONObject | |
String uniqueListingId = "images_to_upload"; //used to name any images being uploaded | |
int count = 0; |
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
100% — FF | |
95% — F2 | |
90% — E6 | |
85% — D9 | |
80% — CC | |
75% — BF | |
70% — B3 | |
65% — A6 | |
60% — 99 | |
55% — 8C |
OlderNewer