Skip to content
Browse files

Minor changes to make it compatible with 2.2

  • Loading branch information...
1 parent 22992fe commit 4a5b92fe1aedd1a1e62d8cdf39c73fc91d2f8cf2 @marczych marczych committed
View
6 App/src/com/ifixit/android/ifixit/GuideIntroViewFragment.java
@@ -80,10 +80,10 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
}
public void setGuide() {
- if (!mGuide.mSubject.isEmpty()) {
- mTitle.setText(Html.fromHtml(mGuide.getSubject()));
+ if (mGuide.mSubject.length() != 0) {
+ mTitle.setText(Html.fromHtml(mGuide.getSubject()));
} else {
- mTitle.setText(Html.fromHtml(mGuide.getTitle()));
+ mTitle.setText(Html.fromHtml(mGuide.getTitle()));
}
mIntro.setText(Html.fromHtml(mGuide.getIntroduction()));
View
8 App/src/com/ifixit/android/ifixit/ImageManager.java
@@ -105,7 +105,7 @@ private void queueImage(String url, Activity activity,
if (mImageQueue.imageRefs.size() > MAX_LOADING_IMAGES)
mImageQueue.imageRefs.removeLast();
- mImageQueue.imageRefs.push(imageRef);
+ mImageQueue.imageRefs.addFirst(imageRef);
mImageQueue.imageRefs.notify();
}
}
@@ -147,7 +147,7 @@ private Bitmap getBitmap(String url) {
private void addToWriteQueue(Bitmap bitmap, File file) {
synchronized (mWriteQueue) {
- mWriteQueue.push(new BitmapFile(bitmap, file));
+ mWriteQueue.addFirst(new BitmapFile(bitmap, file));
mWriteQueue.notify();
}
}
@@ -237,7 +237,7 @@ public void run() {
if (mImageQueue.imageRefs.size() == 0)
continue;
- imageToLoad = mImageQueue.imageRefs.pop();
+ imageToLoad = mImageQueue.imageRefs.removeFirst();
synchronized (mLoadingImages) {
mLoadingImages.put(imageToLoad.getUrl(), imageToLoad);
}
@@ -280,7 +280,7 @@ public void run() {
continue;
}
- bitmapFile = mWriteQueue.pop();
+ bitmapFile = mWriteQueue.removeFirst();
}
writeFile(bitmapFile.mBitmap, bitmapFile.mFile);
View
5 App/src/com/ifixit/android/ifixit/ThumbnailView.java
@@ -28,11 +28,6 @@ public ThumbnailView(Context context, AttributeSet attrs) {
init(context);
}
- public ThumbnailView(Context context, AttributeSet attrs, int def) {
- super(context, attrs, def);
- init(context);
- }
-
private void init(Context context) {
LayoutInflater inflater = (LayoutInflater)context.getSystemService(
Context.LAYOUT_INFLATER_SERVICE);
View
4 App/src/com/ifixit/android/ifixit/TopicsActivity.java
@@ -80,7 +80,7 @@ public void onBackStackChanged() {
int backStackSize = getSupportFragmentManager().getBackStackEntryCount();
if (mBackStackSize > backStackSize) {
- mTopicHistory.pop();
+ mTopicHistory.removeFirst();
}
mBackStackSize = backStackSize;
@@ -115,7 +115,7 @@ public void onTopicSelected(TopicNode topic) {
ft.addToBackStack(null);
}
- mTopicHistory.push(topic);
+ mTopicHistory.addFirst(topic);
ft.commit();
}

0 comments on commit 4a5b92f

Please sign in to comment.
Something went wrong with that request. Please try again.