Skip to content

Instantly share code, notes, and snippets.

@rileyrg
Created August 28, 2014 13:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rileyrg/5671b8d3392f6c142f47 to your computer and use it in GitHub Desktop.
Save rileyrg/5671b8d3392f6c142f47 to your computer and use it in GitHub Desktop.
the fragment layout XML R.layout.debug_fragment
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/debug_listview"
android:layout_width="128sp"
android:background="@color/shadedblack"
android:layout_height="wrap_content">
</ListView>
fragment in a framelayout
<fragment
android:id="@+id/debug_fragment"
android:name="net.home.app.engine.debugging.DebugFragment"
android:layout_width="128sp"
android:layout_height="wrap_content"
android:layout_gravity="left|top"
/>
the DebugFragment onCreateView
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View fragmentView = inflater.inflate(R.layout.debug_fragment, container, false);
((ListView)fragmentView.findViewById(R.id.debug_listview )).setAdapter(adapter = new DebugAdaptor(debugMap));
return fragmentView;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment