Skip to content

Instantly share code, notes, and snippets.

<RelativeLayout
android:id="@+id/postHeader"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_alignParentTop="true"
android:alpha=".5">
<RelativeLayout
android:id="@+id/postHeader"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_alignParentTop="true"
android:background="@drawable/post_header_background" >
private void logout(){
ParseUser.logOut();
Intent intent = new Intent(this, LoginActivity.class);
startActivity(intent);
this.finish();
}
Intent intent;
if(ParseUser.getCurrentUser() == null){
intent = new Intent(this, LoginActivity.class);
}else{
intent = new Intent(this, MainActivity.class);
}
startActivity(intent);
this.finish();
public void init(Context context, String uniqueName, int cacheSize, CompressFormat compressFormat, int quality, CacheType type){
switch (type) {
case DISK:
mImageCache= new DiskLruImageCache(context, uniqueName, cacheSize, compressFormat, quality);
break;
case MEMORY:
mImageCache = new BitmapLruImageCache(cacheSize);
default:
mImageCache = new BitmapLruImageCache(cacheSize);
break;
#
# Description:
#
# This script adds Site Columns to the appropriate Content Types as listed in
# the AddSiteColumnsToContentTypes.csv. The .CSV needs to be saved to
# "C:\PowerShell\" directory. If this directory does not exist, you will need to create it.
#
# Running this script requires running PowerShell with elevated privileges so right
# click the SharePoint 2010 Management Shell and select "Run as administrator" then use
# change directory commands and tabs to run the PS1 from its directory.
Tweet tweet = mData.get(position);
if(tweet != null){
viewHolder.twitterUserImage.setImageUrl(tweet.getUserImageUrl(), ImageCacheManager.getInstance().getImageLoader());
viewHolder.userNameTextView.setText("@" + tweet.getUsername());
viewHolder.messageTextView.setText(tweet.getMessage());
viewHolder.tweetTimeTextView.setText(formatDisplayDate(tweet.getCreatedDate()));
viewHolder.destinationUrl = tweet.getDestinationUrl();
}
<com.android.volley.toolbox.NetworkImageView
android:id="@+id/twitterUserImage"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_width="40dp"
android:layout_height="40dp"
android:padding="5dp"
/>