Fixed bug with not showing items in local index, also fixed issue when progress bar doesnt show

This commit is contained in:
Denis 2014-09-12 16:56:40 +03:00
parent 400b3263ca
commit c76d5a021b
4 changed files with 8 additions and 5 deletions

View file

@ -7,9 +7,9 @@
android:gravity="center_vertical" android:focusable="false" /> android:gravity="center_vertical" android:focusable="false" />
</LinearLayout> </LinearLayout>
<TextView android:id="@+id/download_item" android:gravity="center_vertical" android:layout_width="0dp" android:layout_height="wrap_content" <TextView android:id="@+id/download_item" android:gravity="center_vertical" android:layout_width="0dp" android:layout_height="wrap_content"
android:maxLines="7" android:layout_weight="1" style="@style/ListText.Small"></TextView> android:maxLines="7" android:layout_weight="1" style="@style/ListText.Small"/>
<TextView android:id="@+id/download_descr" android:layout_marginLeft="3dp" android:gravity="right" android:layout_width="wrap_content" <TextView android:id="@+id/download_descr" android:layout_marginLeft="3dp" android:gravity="right" android:layout_width="wrap_content"
android:layout_height="wrap_content" style="@style/ListText.Small"></TextView> android:layout_height="wrap_content" style="@style/ListText.Small"/>
</LinearLayout> </LinearLayout>

View file

@ -13,6 +13,7 @@ import android.view.View;
import android.widget.*; import android.widget.*;
import com.actionbarsherlock.app.ActionBar; import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.SherlockFragmentActivity; import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.actionbarsherlock.view.Window;
import net.osmand.plus.*; import net.osmand.plus.*;
import net.osmand.plus.activities.FavouritesActivity; import net.osmand.plus.activities.FavouritesActivity;
import net.osmand.plus.base.BasicProgressAsyncTask; import net.osmand.plus.base.BasicProgressAsyncTask;
@ -52,7 +53,8 @@ public class DownloadActivity extends SherlockFragmentActivity {
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
getMyApplication().applyTheme(this); getMyApplication().applyTheme(this);
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setProgressBarIndeterminateVisibility(false);
setContentView(R.layout.tab_content); setContentView(R.layout.tab_content);
OsmandSettings settings = ((OsmandApplication) getApplication()).getSettings(); OsmandSettings settings = ((OsmandApplication) getApplication()).getSettings();

View file

@ -461,7 +461,8 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment {
@Override @Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
//fixes issue when local files not shown after switching tabs
reloadIndexes();
ActionBar actionBar = getDownloadActivity().getSupportActionBar(); ActionBar actionBar = getDownloadActivity().getSupportActionBar();
//hide action bar from downloadindexfragment //hide action bar from downloadindexfragment
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);

View file

@ -82,7 +82,7 @@ public class UpdatesIndexFragment extends SherlockListFragment {
TextView name = (TextView) v.findViewById(R.id.download_item); TextView name = (TextView) v.findViewById(R.id.download_item);
TextView description = (TextView) v.findViewById(R.id.download_descr); TextView description = (TextView) v.findViewById(R.id.download_descr);
IndexItem e = items.get(position); IndexItem e = items.get(position);
String eName = e.getVisibleDescription(getMyApplication()) + "\n" + e.getVisibleName(getMyApplication(), osmandRegions); String eName = e.getVisibleName(getMyApplication(), osmandRegions);
name.setText(eName.trim()); //$NON-NLS-1$ name.setText(eName.trim()); //$NON-NLS-1$
String d = e.getDate(format) + "\n" + e.getSizeDescription(getMyApplication()); String d = e.getDate(format) + "\n" + e.getSizeDescription(getMyApplication());
description.setText(d); description.setText(d);