Fix for progress bar and fix for screen rotation

This commit is contained in:
GaidamakUA 2015-10-12 19:18:03 +03:00
parent 5298296ea3
commit 334d278bc7
4 changed files with 19 additions and 18 deletions

View file

@ -45,7 +45,6 @@ import net.osmand.plus.activities.TabActivity;
import net.osmand.plus.base.BasicProgressAsyncTask;
import net.osmand.plus.download.items.ActiveDownloadsDialogFragment;
import net.osmand.plus.download.items.DialogDismissListener;
import net.osmand.plus.download.items.RegionDialogFragment;
import net.osmand.plus.download.items.SearchDialogFragment;
import net.osmand.plus.download.items.WorldItemsFragment;
import net.osmand.plus.srtmplugin.SRTMPlugin;
@ -118,8 +117,8 @@ public class DownloadActivity extends BaseDownloadActivity implements DialogDism
mTabs.add(new TabActivity.TabItem(R.string.download_tab_downloads,
getString(R.string.download_tab_downloads), WorldItemsFragment.class));
mTabs.add(new TabActivity.TabItem(R.string.download_tab_downloads,
getString(R.string.download_tab_downloads), DownloadIndexFragment.class));
// mTabs.add(new TabActivity.TabItem(R.string.download_tab_downloads,
// getString(R.string.download_tab_downloads), DownloadIndexFragment.class));
mTabs.add(new TabActivity.TabItem(R.string.download_tab_local,
getString(R.string.download_tab_local), LocalIndexesFragment.class));
mTabs.add(new TabActivity.TabItem(R.string.download_tab_updates,

View file

@ -161,20 +161,20 @@ public class IndexItem implements Comparable<IndexItem>, HasName, Parcelable {
this.initializedName = initializedName;
}
// @Override
// public String toString() {
// return "IndexItem{" +
// "description='" + description + '\'' +
// ", fileName='" + fileName + '\'' +
// ", simplifiedFileName='" + simplifiedFileName + '\'' +
// ", size='" + size + '\'' +
// ", timestamp=" + timestamp +
// ", contentSize=" + contentSize +
// ", containerSize=" + containerSize +
// ", type=" + type.getTag() +
// ", extra=" + extra +
// '}';
// }
@Override
public String toString() {
return "IndexItem{" +
"description='" + description + '\'' +
", fileName='" + fileName + '\'' +
", simplifiedFileName='" + simplifiedFileName + '\'' +
", size='" + size + '\'' +
", timestamp=" + timestamp +
", contentSize=" + contentSize +
", containerSize=" + containerSize +
", type=" + type.getTag() +
", extra=" + extra +
'}';
}
@Override
public int describeContents() {

View file

@ -156,6 +156,7 @@ public class ActiveDownloadsDialogFragment extends DialogFragment {
downloadEntry.sizeMB));
} else if (isDownloaded) {
// Downloaded
isIndeterminate = false;
localProgress = progressBar.getMax();
descrTextView.setText(String.format("%.1f MB", downloadEntry.sizeMB));

View file

@ -69,7 +69,8 @@ public class RegionDialogFragment extends DialogFragment{
listener = new DialogDismissListener() {
@Override
public void onDialogDismissed() {
getDownloadActivity().registerFreeVersionBanner(view);
if (getDownloadActivity() != null)
getDownloadActivity().registerFreeVersionBanner(view);
}
};
return view;