android - Samsung Galaxy Nexus S3 issues rendering View Objects (multiple issues) -
- device: samsung galaxy nexus
- install: device blank, used development
- android version: 4.2.2
so started working project today. noticed when typed edittext object
using default on screen keyboard not hint set not going away there white vertical lines on either side of each character typed.
i messed around properties (though barely did minimum add edittext via xml). after while send apk co-worker , asked him run on device (not galaxy nexus). screen cap sent me showed no such errors. decided ignore , move on.
the rest of day has been odd issues shouldn't happening. 1 example had activity fragment , after task attempted switch out fragments. (they added programmatically framelayout viewgroup
in activities layout (after other methods failed)). new fragment added old still show. pressing home/recent , returning app removed fragment shouldn't have been showing @ all. decided change layout file using setcontentview
of activity instead of switching activities. same result. tried inflate contentview view myself , later call view.setvisible(view.gone)
(later trying view.invisible
well). no luck. worth mentioning calls invalidate (on pretty think of) did not make removed content disappear.
so guess question heck possible causing chaos? has ever experienced issue this?
current activity code (only method oncreate() far):
private view layout1, layout2; @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); super.requestwindowfeature(window.feature_no_title); layoutinflater factory = getlayoutinflater(); layout1 = factory.inflate(r.layout.building_list, null); layout2 = factory.inflate(r.layout.activity_files, null); super.setcontentview(layout1); new thread(new runnable() { @override public void run() { try{thread.sleep(1000);} catch(exception e){} runonuithread(new runnable() { @override public void run() { filesactivity.this.setcontentview(layout2); } }); } }).start(); }
xml code layout1:
<relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/build_list_frag" android:layout_width="match_parent" android:layout_height="match_parent" > <textview android:id="@+id/textview1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_above="@+id/pin_wheel" android:layout_centerhorizontal="true" android:layout_marginbottom="44dp" android:text="@string/building_list_text" android:textappearance="?android:attr/textappearancelarge" /> <progressbar android:id="@+id/pin_wheel" style="@android:style/widget.progressbar" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerhorizontal="true" android:layout_centervertical="true" /> </relativelayout>
xml code layout2:
<relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > <textview android:id="@+id/files_title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignparenttop="true" android:layout_centerhorizontal="true" android:layout_margintop="28dp" android:text="@string/files_title" android:textappearance="?android:attr/textappearancelarge" /> <textview android:id="@+id/textview1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerhorizontal="true" android:layout_centervertical="true" android:text="list of files go here" android:textappearance="?android:attr/textappearancelarge" /> </relativelayout>
if others having odd rendering issues. such text displaying improperly. view
objects have been removed continue display (and i'm sure there many many more). should try changing app's base theme different (most likely, others, @ res/values/styles.xml). check activities listed in manifest file use theme think using (if don't set theme's per activity make sure view
objects need specific styles have been set such).
example:
<activity android:name=".mainactivity" android:configchanges="orientation|keyboardhidden|screensize" android:label="@string/app_name" android:theme="@style/apptheme" > <!-- line, if using custom theme should used here--> <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity>
Comments
Post a Comment