का हिस्सा बाहर ब्लैकिंग मैं अपने एंड्रॉइड एप्लिकेशन में Google मानचित्र एंड्रॉइड एपीआई v2 को एकीकृत करने की कोशिश कर रहा हूं। मैं अपने लेआउट के बीच में Google मानचित्र रख रहा हूं। जब स्क्रीन लेआउट फिट करने में सक्षम होता है तो यह बहुत अच्छा काम करता है, लेकिन जब लेआउट फिट करने के लिए बहुत बड़ा होता है, और उपयोगकर्ता शेष सामग्री को देखने के लिए नीचे स्क्रॉल करता है, तो शेष लेआउट Google मानचित्र द्वारा काला हो जाता है।Google मानचित्र एंड्रॉइड एपीआई वी 2 लेआउट
: निम्न स्क्रीनशॉट देखें (नोट:। सभी नक्शा इशारों उपयोगकर्ता स्क्रॉल करने के लिए अनुमति देने के लिए अक्षम हैं)
मेरे लेआउट एक्सएमएल:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:scrollbars="vertical"
android:fillViewport="true" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="20sp" >
<TextView
android:id="@+id/race_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="14sp"
android:textSize="@dimen/DetailsTop"
android:layout_alignParentLeft="true"
android:layout_toLeftOf="@+id/race_in_chase" />
<TextView
android:id="@id/race_in_chase"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/in_the_chase"
android:textSize="@dimen/DetailsTop"
android:background="@drawable/inthechase"
android:paddingLeft="20sp"
android:paddingRight="20sp"
android:visibility="gone"
android:layout_alignParentRight="true" />
<TextView
android:id="@+id/race_name"
style="@style/RaceDetailsName"
android:layout_below="@id/race_num" />
<TextView
android:id="@+id/race_track"
style="@style/RaceDetailsText"
android:paddingBottom="20sp"
android:layout_below="@id/race_name" />
<TextView
android:id="@+id/race_time"
style="@style/RaceDetailsText"
android:layout_below="@id/race_track" />
<TextView
android:id="@+id/race_tv"
style="@style/RaceDetailsText"
android:layout_below="@id/race_time" />
<fragment
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="380dp"
android:layout_marginTop="20sp"
android:layout_marginBottom="20sp"
class="com.google.android.gms.maps.SupportMapFragment"
android:layout_below="@id/race_tv" />
<TextView
android:id="@+id/race_track_size"
style="@style/RaceDetailsText"
android:layout_below="@id/map" />
</RelativeLayout>
</ScrollView>
मेरे मानचित्र सेटअप में मेरी गतिविधि:
private void setUpMapIfNeeded() {
if (mMap == null) {
mMap = ((SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map)).getMap();
if (mMap != null) {
setUpMap();
}
}
}
private static final LatLng CHICAGOLAND = new LatLng(41.474856, -88.056928);
private void setUpMap() {
mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);
mMap.getUiSettings().setZoomControlsEnabled(false);
mMap.getUiSettings().setAllGesturesEnabled(false);
CameraPosition cameraPosition = new CameraPosition.Builder()
.target(CHICAGOLAND)
.zoom(14.5f)
.bearing(53)
.build();
mMap.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));
}
मेरा हंच नक्शा खंड है n अगर लेआउट स्क्रीन पर फिट बैठता है और स्क्रॉलिंग की आवश्यकता नहीं है तो लेआउट के बाद स्क्रॉलव्यू की तरह ठीक है। नक्शा स्वयं सही आकार प्रतीत होता है। ब्लैकआउट दृश्य में शेष वस्तुओं का सटीक आकार है। क्या किसी के पास कोई विचार है कि मैं मानचित्र के नीचे ब्लैकआउट से कैसे छुटकारा पा सकता हूं ताकि मैं नीचे टेक्स्टव्यू देख सकूं? अब तक जो कुछ भी मैंने कोशिश की है वह काम नहीं कर पाया है।
वास्तव में कोई झिलमिलाहट नहीं? मैंने SlidngMenu के साथ इस समाधान की कोशिश की, लेकिन यह कुछ भी नहीं बदला। विवरण के लिए इसे देखें: http://stackoverflow.com/questions/14419521/moving-mapfragment-surfaceview-causes-black-background-flickering/14571989#comment20335526_14571989 –
मेरे पास नक्शा के नीचे संपादन टेक्स्ट हैं और मैंने इसका उपयोग किया, संपादन टेक्स्ट अगले खो देता है फोकस, मैं यह कैसे कर सकता हूं, या कोई और तरीका है? – JRowan