Skip to content Skip to sidebar Skip to footer

How To Set Url Image Properly In Android?

I am new to android, I am trying to open URL image on my main screen. My problem is that I am using navigation drawer also on my main page. Everything works fine only my main image

Solution 1:

The problem occur for main_content xml . your image is cut off when you use it in you main_activity xml . Use this trick it will work . Simple put margin above your main_content xml

<RelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"android:layout_height="match_parent"><FrameLayoutandroid:layout_marginTop="?actionBarSize"android:id="@+id/content_frame"android:layout_width="match_parent"android:layout_height="match_parent"></FrameLayout></RelativeLayout>

Solution 2:

You have to include a custom action bar in your layout.

Please follow this link. It is explained very nicely with the code snaps and in depth. :)

Solution 3:

In MainAcitivity you should extends Activity no an AppCompatActivity. AppCompatActivity show a bar

Post a Comment for "How To Set Url Image Properly In Android?"