Is there a way to visualize how a fragment would look like when it's loaded in adnroid studio inspector?

60
January 12, 2019, at 9:50 PM

I'm making an android app that has a couple of fragments in it. I was wondering if you could look at how your fragments would look like when they are loaded in the layout inspector. It would be much more easy to adjust them as now I have to deploy the app to my phone every time I want to look at what has changed. I can't use the emulator because I'm using frameworks that don't run on the emulator.

It would be nice if instead of them showing as I could see what they would look like in the app.

Answer 1

You can use

tools:layout="@android:layout/myfragment"

Don't forget to add tools namespace to root element : xmlns:tools="http://schemas.android.com/tools"

READ ALSO
xamarin android resource management

xamarin android resource management

I had a newly created Xamarin Android native app and was trying to display a three dots icon for popup menu (⋮)Using this xml it worked

78
Volley non-responsive after 200 records being returned?

Volley non-responsive after 200 records being returned?

I have an android app that queries an online database displays records in a listviewIt works fine until 200 records, after which there isn't any response or error

71
change visibility of Recyclerview.ViewHolder items

change visibility of Recyclerview.ViewHolder items

I have a custom recyclerview adapterBased on some conditions I want to change the visibility of ViewHolder items

70
Mutable array get overridden when get asserted to another variable

Mutable array get overridden when get asserted to another variable

I have A simple case where I Have "List A" with 5 values and another "List B" acts As TempList holding "List A" values now when I call "list_Aclear()" "list_B" also get Cleared why?

30