Fix builds

This commit is contained in:
Bars107 2015-01-24 14:04:52 +02:00
parent 7925c9d13d
commit 3391d1ad96
6 changed files with 54 additions and 24 deletions

View file

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="?attr/actionBarSize">
<LinearLayout android:id="@+id/progressContainer"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
android:gravity="center">
<ProgressBar style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:paddingTop="4dip"
android:singleLine="true" />
</LinearLayout>
<FrameLayout android:id="@+id/listContainer"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:drawSelectorOnTop="false" />
<TextView android:id="@+id/internalEmpty"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:textAppearance="?android:attr/textAppearanceLarge" />
</FrameLayout>
</FrameLayout>

View file

@ -2,6 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginTop="?attr/actionBarSize"
android:orientation="vertical">
<TextView
@ -9,12 +10,12 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/select_plugin_to_activate"></TextView>
android:text="@string/select_plugin_to_activate"/>
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_weight="1"
android:layout_height="0dp"
android:layout_marginTop="10dp"></ListView>
android:layout_marginTop="10dp"/>
</LinearLayout>

View file

@ -16,7 +16,6 @@ import android.widget.*;
import net.osmand.AndroidUtils;
import net.osmand.access.AccessibleToast;
import net.osmand.plus.R;
import net.osmand.util.Algorithms;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserFactory;

View file

@ -62,20 +62,10 @@ public abstract class OsmandListActivity extends
return menuItem;
}
public void fixBackgroundRepeat(View view) {
Drawable bg = view.getBackground();
if (bg != null) {
if (bg instanceof BitmapDrawable) {
BitmapDrawable bmp = (BitmapDrawable) bg;
// bmp.mutate(); // make sure that we aren't sharing state anymore
bmp.setTileModeXY(TileMode.REPEAT, TileMode.REPEAT);
}
}
}
public void setListAdapter(ListAdapter adapter){
((ListView)findViewById(android.R.id.list)).setAdapter(adapter);
setOnItemClickListener(this);
}
public ListView getListView() {

View file

@ -57,12 +57,6 @@ public class SettingsActivity extends SettingsBaseActivity {
startActivity(new Intent(this, SettingsNavigationActivity.class));
}
}
about = new Preference(this);
about.setOnPreferenceClickListener(this);
about.setSummary(R.string.about_settings_descr);
about.setTitle(R.string.about_settings);
about.setKey("about");
screen.addPreference(about);
if ((Version.getBuildAppEdition(getMyApplication()).length() > 0
|| Version.isDeveloperVersion(getMyApplication())) &&
OsmandPlugin.getEnabledPlugin(OsmandDevelopmentPlugin.class) != null){
@ -73,6 +67,12 @@ public class SettingsActivity extends SettingsBaseActivity {
version.setKey("version");
screen.addPreference(version);
}
about = new Preference(this);
about.setOnPreferenceClickListener(this);
about.setSummary(R.string.about_settings_descr);
about.setTitle(R.string.about_settings);
about.setKey("about");
screen.addPreference(about);
}
@Override

View file

@ -51,12 +51,11 @@ public class ShowRouteInfoActivity extends OsmandListActivity {
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
ListView lv = new ListView(this);
lv.setId(android.R.id.list);
setContentView(R.layout.default_list_view);
ListView lv = (ListView) findViewById(android.R.id.list);
header = new TextView(this);
helper = ((OsmandApplication)getApplication()).getRoutingHelper();
lv.addHeaderView(header);
setContentView(lv);
dm = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(dm);