Я импортировал проект eclipse в Android Studio и обновлен до com.googleAppient.map.mon.api.GoogleApiClient.Проблема с копией при импорте проекта Eclipse в Studio
У моего проекта есть одно основное действие со многими фрагментами. В главном фрагменте кнопки есть карта. Смотрите ниже для добавления карты:
private void addMap() {
FragmentManager fm = getChildFragmentManager();
if(isGoogleMapsInstalled())
{
if (fragment == null)
{
GoogleMapOptions op = new GoogleMapOptions();
op.zOrderOnTop(true);
op.zoomControlsEnabled(false);
fragment = MapFragment.newInstance(op);
fm.beginTransaction().replace(R.id.homemap_id, fragment).commit();
}
}else
{
Toast.makeText(getActivity(), "Please install google map", Toast.LENGTH_SHORT).show();
}
}
При управлении проектом успешно, карта скрывая все виды и кнопки, расположенные на нем. Даже слайдер меню MainActivity отображается ниже карты, но работает с карты, а карта становится отключенной.
** Редактировать :: не Думал, что это может быть becoz некоторого вопроса памяти привыкшей ниже кода в приложении Gradle, но не повезло.
multiDexEnabled true
dexOptions {
incremental true
javaMaxHeapSize "4g"
}
Пожалуйста, помогите решить эту проблему. ** Примечание: код хорошо работал в Eclipse.
редактировать ::
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:custom="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg_texture_a"
android:orientation="vertical" >
<RelativeLayout android:id="@+id/map_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" >
<FrameLayout
android:id="@+id/homemap_id"
android:background="@color/dark_red_text_trans"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</FrameLayout>
<CheckBox
android:id="@+id/traffic_heat_btn"
android:layout_width="42dp"
android:layout_height="42dp"
android:layout_alignParentRight="true"
android:layout_marginRight="10dp"
android:layout_marginTop="70dp"
android:background="@drawable/selector_traffic_toggle"
android:button="@null"
android:checked="false"
android:scaleType="fitCenter" />
<TextView
android:id="@+id/mylocation_btn"
android:layout_width="42dp"
android:layout_height="42dp"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginRight="10dp"
android:layout_marginBottom="70dp"
android:background="@drawable/selector_location_toggle"
android:button="@null"
android:scaleType="fitCenter" />
<HorizontalScrollView
android:id="@+id/box_horizonScroll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="0dp"
android:orientation="horizontal"
android:scrollbars="vertical"
android:visibility="gone" >
<!-- android:background="#aaffffff" -->
<LinearLayout
android:id="@+id/dependent_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingLeft="5dp"
android:paddingRight="5dp" >
</LinearLayout>
</HorizontalScrollView>
</RelativeLayout>
<LinearLayout
android:id="@+id/mask_bottom_layout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:background="@color/dark_red_text"
android:gravity="center_vertical"
android:orientation="horizontal"
android:visibility="gone" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:paddingBottom="17dp"
android:paddingLeft="20dp"
android:paddingTop="17dp"
android:text="Cancel"
android:textColor="@color/white"
android:textSize="@dimen/text_sizes_smallest"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="DONE"
android:textColor="@color/white"
android:textSize="@dimen/text_sizes_medium"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:paddingRight="15dp"
android:text="Clear Filters"
android:textColor="@color/white"
android:textSize="@dimen/text_sizes_smallest"
android:textStyle="bold"
android:visibility="visible" />
</LinearLayout>
</LinearLayout>
Можете ли вы разместить макет xml-файлов? – Raghavendra
Похоже, что в вашей xml-макете есть проблема. Пожалуйста, разместите свой XML-файл здесь для получения дополнительной информации по этой проблеме. –
@ Raghavendra Я также добавил макет xml. пожалуйста, обратитесь к нему, и любая помощь будет признательна. – Deepak