android - ListActivity layout not having margins around -
edit: problem seems with:
requestwindowfeature(window.feature_indeterminate_progress);
within oncreate... don't know why...
i have code:
public class bluetoothdiscovery extends listactivity { @override protected void onlistitemclick(listview l, view v, int position, long id) { string mac = this.discoveredprinters.get(position); intent = new intent(); i.putextra("mac", mac); setresult(result_ok, i); // finalizamos el activity finish(); } private arraylist<string> discoveredprinters = null; private arrayadapter<string> marrayadapter; private static discoveryhandler btdiscoveryhandler = null; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); requestwindowfeature(window.feature_indeterminate_progress); // configuramos el theme del activity utils.setcustomtheme(this, getapplicationcontext(), true); setcontentview(r.layout.discovery_results); ---
the layout xml file follows:
<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:gravity="center" > <listview android:id="@android:id/list" android:layout_width="fill_parent" android:layout_height="match_parent" android:layout_margin="10dp"/> <textview android:id="@id/android:empty" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="no printers found" android:layout_margin="10dp"/>
but cannot see why title close borders of activity. in case necessary, manifest expresses activity way:
<activity android:name=".printing.bluetoothdiscovery" android:screenorientation="landscape" android:theme="@android:style/theme.holo" android:windowsoftinputmode="adjustpan|statehidden" > </activity>
this how activity invoked preferences:
public class adjustmentsactivity extends preferenceactivity implements onsharedpreferencechangelistener { .... .... etprinter = (preference) findpreference("key_select_printer"); etprinter.setonpreferenceclicklistener(new onpreferenceclicklistener() { public boolean onpreferenceclick(preference preference) { string printermac = utils .obtenermacprintersharedpreferences(getapplicationcontext()); intent intentlocateprinter = new intent( getapplicationcontext(), bluetoothdiscovery.class); intentlocateprinter.putextra("titulo", "búsqueda de impresora bluetooth"); startactivityforresult(intentlocateprinter, request_selected_printer); return true; } });
and next visually obtain weird due lack of margings around whole view. question problem located (manifest, xml, class)?.
thanks in advance,
jose.
Comments
Post a Comment