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
<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" | |
/> |
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
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(); | |
} |
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
# | |
# 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. |
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 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; |
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
Intent intent; | |
if(ParseUser.getCurrentUser() == null){ | |
intent = new Intent(this, LoginActivity.class); | |
}else{ | |
intent = new Intent(this, MainActivity.class); | |
} | |
startActivity(intent); | |
this.finish(); |
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
private void logout(){ | |
ParseUser.logOut(); | |
Intent intent = new Intent(this, LoginActivity.class); | |
startActivity(intent); | |
this.finish(); | |
} |
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
<RelativeLayout | |
android:id="@+id/postHeader" | |
android:layout_width="match_parent" | |
android:layout_height="48dp" | |
android:layout_alignParentTop="true" | |
android:background="@drawable/post_header_background" > |
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
<RelativeLayout | |
android:id="@+id/postHeader" | |
android:layout_width="match_parent" | |
android:layout_height="48dp" | |
android:layout_alignParentTop="true" | |
android:alpha=".5"> |
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 MyAdapter extends BaseAdapter { | |
@Override public void getView(int position, View view, ViewGroup parent) { | |
ViewHolder holder; | |
if (view != null) { | |
holder = (ViewHolder) view.getTag(); | |
} else { | |
view = inflater.inflate(R.layout.whatever, parent, false); | |
holder = new ViewHolder(view); | |
view.setTag(holder); | |
} |
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
View view = inflater.inflate(R.layout.fragment_login, container, false); | |
mUserNameEditText = (EditText) view.findViewById(R.id.username); | |
mPasswordEditText = (EditText) view.findViewById(R.id.password); |
OlderNewer