Fix 2.3.4 crashes
This commit is contained in:
parent
5324f1578a
commit
46fd613998
8 changed files with 19 additions and 10 deletions
|
@ -78,7 +78,7 @@
|
||||||
android:id="@+id/button_replace"
|
android:id="@+id/button_replace"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:textColor="?attr/contextMenuButtonColor"
|
android:textColor="?attr/contextMenuButtonColor"
|
||||||
android:text="@string/update_existing"
|
android:text="@string/update_existing"
|
||||||
android:visibility="gone"/>
|
android:visibility="gone"/>
|
||||||
|
|
|
@ -9,10 +9,11 @@
|
||||||
android:theme="@style/OsmandLightTheme">
|
android:theme="@style/OsmandLightTheme">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
android:id="@+id/background_image"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
android:src="@drawable/bg_first_usage"/>
|
android:background="@color/osmand_orange"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
android:drawableLeft="@drawable/ic_action_folder"
|
android:drawableLeft="@drawable/ic_action_folder"
|
||||||
android:paddingLeft="10dp"
|
android:paddingLeft="10dp"
|
||||||
android:paddingRight="10dp"
|
android:paddingRight="10dp"
|
||||||
android:background="?android:selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:text="Restaurant"
|
android:text="Restaurant"
|
||||||
android:gravity="left|center_vertical"
|
android:gravity="left|center_vertical"
|
||||||
android:textSize="@dimen/default_list_text_size"
|
android:textSize="@dimen/default_list_text_size"
|
||||||
|
|
|
@ -9,10 +9,11 @@
|
||||||
android:theme="@style/OsmandLightTheme">
|
android:theme="@style/OsmandLightTheme">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
android:id="@+id/background_image"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
android:src="@drawable/bg_first_usage"/>
|
android:background="@color/osmand_orange"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
|
@ -92,7 +92,7 @@
|
||||||
android:id="@+id/title_button_top_right"
|
android:id="@+id/title_button_top_right"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:paddingLeft="@dimen/context_menu_button_padding_x"
|
android:paddingLeft="@dimen/context_menu_button_padding_x"
|
||||||
android:paddingRight="@dimen/context_menu_button_padding_x"
|
android:paddingRight="@dimen/context_menu_button_padding_x"
|
||||||
|
@ -183,7 +183,7 @@
|
||||||
android:id="@+id/title_button"
|
android:id="@+id/title_button"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:gravity="left|center_vertical"
|
android:gravity="left|center_vertical"
|
||||||
android:paddingLeft="@dimen/context_menu_button_padding_x"
|
android:paddingLeft="@dimen/context_menu_button_padding_x"
|
||||||
android:paddingRight="@dimen/context_menu_button_padding_x"
|
android:paddingRight="@dimen/context_menu_button_padding_x"
|
||||||
|
@ -206,7 +206,7 @@
|
||||||
android:id="@+id/title_button_right"
|
android:id="@+id/title_button_right"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:drawableLeft="@drawable/ic_action_delete_dark"
|
android:drawableLeft="@drawable/ic_action_delete_dark"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:paddingLeft="@dimen/context_menu_button_padding_x"
|
android:paddingLeft="@dimen/context_menu_button_padding_x"
|
||||||
|
@ -267,7 +267,7 @@
|
||||||
android:layout_width="@dimen/context_menu_progress_cancel_button_size"
|
android:layout_width="@dimen/context_menu_progress_cancel_button_size"
|
||||||
android:layout_height="@dimen/context_menu_progress_cancel_button_size"
|
android:layout_height="@dimen/context_menu_progress_cancel_button_size"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:background="?android:selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:scaleType="center"
|
android:scaleType="center"
|
||||||
tools:src="@drawable/map_action_cancel"/>
|
tools:src="@drawable/map_action_cancel"/>
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@
|
||||||
android:id="@+id/button_replace"
|
android:id="@+id/button_replace"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?android:selectableItemBackground"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:textColor="?attr/contextMenuButtonColor"
|
android:textColor="?attr/contextMenuButtonColor"
|
||||||
android:text="@string/update_existing"
|
android:text="@string/update_existing"
|
||||||
android:visibility="gone"/>
|
android:visibility="gone"/>
|
||||||
|
|
|
@ -14,6 +14,7 @@ import android.view.Window;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
import net.osmand.plus.download.DownloadActivity;
|
import net.osmand.plus.download.DownloadActivity;
|
||||||
|
@ -24,6 +25,12 @@ public class FirstUsageFragment extends Fragment {
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
View view = inflater.inflate(R.layout.first_usage_fragment, container, false);
|
View view = inflater.inflate(R.layout.first_usage_fragment, container, false);
|
||||||
|
ImageView backgroundImage = (ImageView) view.findViewById(R.id.background_image);
|
||||||
|
if (Build.VERSION.SDK_INT >= 14) {
|
||||||
|
backgroundImage.setImageResource(R.drawable.bg_first_usage);
|
||||||
|
} else {
|
||||||
|
backgroundImage.setImageDrawable(null);
|
||||||
|
}
|
||||||
final EditText editText = (EditText) view.findViewById(R.id.searchEditText);
|
final EditText editText = (EditText) view.findViewById(R.id.searchEditText);
|
||||||
Drawable searchIcon = ((MapActivity) getActivity()).getMyApplication().getIconsCache()
|
Drawable searchIcon = ((MapActivity) getActivity()).getMyApplication().getIconsCache()
|
||||||
.getIcon(R.drawable.ic_action_search_dark, true);
|
.getIcon(R.drawable.ic_action_search_dark, true);
|
||||||
|
|
|
@ -23,7 +23,7 @@ import android.widget.ImageButton;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
import android.widget.Space;
|
import android.support.v4.widget.Space;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue