i designing splash screen app i'm working on last 1 month. have added image in xml file , applied fade_in effect using fade_in.xml .. 1 strange thing noticed fade_in works when using apptheme stops working when changed theme notitlebar using below line of code:
android:theme="@android:style/theme.notitlebar"
(inside manifest.xml)
i need put in manifest...can't remove ...any solution appreciated.
replace
android:theme="@android:style/theme.notitlebar.fullscreen"
or
use app theme , change code
@override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); getactionbar().hide();
or use below code reference
import android.app.activity; import android.content.intent; import android.os.bundle; import android.view.window; import android.view.windowmanager; public class splash extends activity { @suppresswarnings("rawtypes") @override protected void oncreate(bundle savedinstancestate) { // todo auto-generated method stub this.getwindow().setflags(windowmanager.layoutparams.flag_fullscreen, windowmanager.layoutparams.flag_fullscreen); this.requestwindowfeature(window.feature_no_title); super.oncreate(savedinstancestate); setcontentview(r.layout.splash); thread loading = new thread() { public void run() { try { sleep(1000); startactivity(new intent(splash.this, mainactivity.class)); } catch (exception e) { e.printstacktrace(); } finally { finish(); } } }; loading.start(); } }
`
Comments
Post a Comment