Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 14    Views: 95

benedettoapp
Lost but trying
Profile
Posts: 139
Reg: Jun 22, 2013
Italy
6,340
12/02/14 01:44 PM (9 years ago)

Splash Screen (again)

@GoNorthWest, @David Book, @Niraj, You 3 guys have just fixed the Android Driving Directions, would you be so kind to fix once and for all the Splash Screen, in the forum there are tons of issue about it. It should be the easiest(basic) plugin, but it just won't work, I'm trying it with android for now, i don't know about ios. I just want it simple, no animation, app launches, splash screen shows for 2 or 3 seconds and disappears no animation, and app comes up.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
12/02/14 04:30 PM (9 years ago)
I don't see that happening all that soon. Plenty of people have had success with it, but others have not. I personally think it's an Android issue. But, given all that David wants to do for this platform, and given the lack of a specific good debug data for the problem, I think this would be a low priority. Maybe one of the code ninjas in the group can come up with something! Mark
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
12/02/14 10:57 PM (9 years ago)
>It should be the easiest(basic) plugin, No, it is the most confusing plugin in the market, as it requires you to visit TWO screens instead of only one. It is not easy to use, but it does work if applied properly. >but it just won't work, We cannot help you unless you provide what you did, in what order, possibly with images of control panels for the plugins required.
 
benedettoapp
Lost but trying
Profile
Posts: 139
Reg: Jun 22, 2013
Italy
6,340
like
12/03/14 02:29 AM (9 years ago)
Ok all of this is for android. Working is working, but not in a nice way, there is no way to control the animation, and no matter what i put in the settings nothing changes, the app loads checks for update, the animation starts with the image growing from the top to full screen ( which i would like to disable and having it show full screen only ) then the black screen appears for the amount of seconds i set in the settings, and the app loads. It does look like there are 2 screens the animation and the black, is it possible to disable the animation and change the black to the image?
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
12/03/14 03:16 AM (9 years ago)
You can have a look at the file, in the anim folder: bt_screen_splash_effect_falldown.xml Maybe fiddling with the values in this file will get you the desired result. Here is the content: <scale android:duration="12000" android:fromXScale="1" android:fromYScale="0.5" android:pivotX="50%" android:pivotY="0%" android:toXScale="1.0" android:toYScale="1.0" /> You will notice I put the value of 12000 instead of the default 1200 for the duration, and yes, the showing of the image is ten times longer. In the anim folder of your project, you will find many other xml files that you can fill in and activate in the source code by going to the line Animation anim = AnimationUtils.loadAnimation(getActivity(), R.anim.bt_screen_splash_effect_falldown); and changing the name of xml file.
 
benedettoapp
Lost but trying
Profile
Posts: 139
Reg: Jun 22, 2013
Italy
6,340
like
12/03/14 05:00 AM (9 years ago)
Ok done, i changed to this: <scale android:duration="3000" android:fromXScale="1" android:fromYScale="1" android:pivotX="100%" android:pivotY="100%" android:toXScale="1.0" android:toYScale="1.0" /> and now the image is fixed, no effects, and even if i put 0 as duration in the control panel, after the image i still get a black screen before the app, it's just a flash but it's there, anyway i can get rid of it?
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
12/03/14 05:05 AM (9 years ago)
Great, now I Googled for the following keyword android splash screen black screen before the app and it seems this link, the first on the listing page, is helpful: http://stackoverflow.com/questions/14307126/black-screen-before-splash-screen-appear-in-android
 
benedettoapp
Lost but trying
Profile
Posts: 139
Reg: Jun 22, 2013
Italy
6,340
like
12/03/14 05:24 AM (9 years ago)
but those are because of a black screen before the splash, my problem is in between, splash-blackscreen-app
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
12/03/14 06:03 AM (9 years ago)
Well, well, I then Googled the following keyphrase android splash screen black screen after and voila, someone else has already had that problem: http://stackoverflow.com/questions/19516224/android-black-screen-is-coming-after-splash-screen Does that solve your problem?
 
benedettoapp
Lost but trying
Profile
Posts: 139
Reg: Jun 22, 2013
Italy
6,340
like
12/03/14 06:47 AM (9 years ago)
Ok that sounds like my problem, but i'm trying to figure out what to do exactly, i cannot find those strings anywhere in any file, the guy talks about the splash Activity class, where is that?
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
12/03/14 06:56 AM (9 years ago)
Supposing you are using BT version 3.0, the file you need is BT_screen_splash Roughly speaking, in BT 3.0 there are no activities, only fragments. So, have a look at the above class, compare the code from StackOverflow and go from there.
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
12/03/14 07:41 PM (9 years ago)
Nice helpings from Dusko -- thank you! :-)
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
12/03/14 10:39 PM (9 years ago)
>Nice helpings from Dusko -- thank you! :-) You are welcome!
 
benedettoapp
Lost but trying
Profile
Posts: 139
Reg: Jun 22, 2013
Italy
6,340
like
12/04/14 04:17 AM (9 years ago)
I'm sorry, i cannot manage to fix this, i'm not a programmer at all, i've tried but no luck. From what I understood so far it's the BT_screen_splash.java file and somewhere in this part I should make changes: ----------------------------------------------------------------------------- public class BT_screen_splash extends BT_fragment implements OnTouchListener{ //properties... String transitionType = ""; String effectName = ""; int startTransitionAfterSeconds = 0; int transitionDurationSeconds = 0; //onCreateView... @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){ /* Note: fragmentName property is already setup in the parent class (BT_fragment). This allows us to add the name of this class file to the LogCat console using the BT_debugger. */ //show life-cycle event in LogCat console... BT_debugger.showIt(fragmentName + ":onCreateView JSON itemId: \"" + screenData.getItemId() + "\" itemType: \"" + screenData.getItemType() + "\" itemNickname: \"" + screenData.getItemNickname() + "\""); //inflate the layout file for this screen... View thisScreensView = inflater.inflate(R.layout.bt_screen_splash, container, false); //set touch listener to view... thisScreensView.setOnTouchListener(this); //must have screen data... if(this.screenData != null){ //ask BT_viewUtilities to setup this screens background color... BT_viewUtilities.updateBackgroundColorsForScreen(this.getActivity(), screenData); //get animation values from JSON... this.transitionType = BT_strings.getJsonPropertyValue(this.screenData.getJsonObject(), "transitionType", ""); this.effectName = BT_strings.getJsonPropertyValue(this.screenData.getJsonObject(), "effectName", "fallDown"); this.startTransitionAfterSeconds = Integer.parseInt(BT_strings.getJsonPropertyValue(this.screenData.getJsonObject(), "startTransitionAfterSeconds", "1")); this.transitionDurationSeconds = Integer.parseInt(BT_strings.getJsonPropertyValue(this.screenData.getJsonObject(), "transitionDurationSeconds", "1")); //if we have an effect we do it first, then start the animation sequence... if(effectName != ""){ new Handler().postDelayed(new Runnable() { public void run(){ //pass effect type and reference to the background image to the startEffect method.. ImageView imgView = (ImageView)getActivity().findViewById(R.id.backgroundImageView); startEffect(effectName, imgView); } }, 100); } }//screenData != null... //show a message if this fragment is NOT running in the BT_activity_start Activity... (it should be)... if(this.getActivity().getClass().getSimpleName().toString().equalsIgnoreCase("BT_activity_host")){ showToast("Note: The Action Bar will be hidden when splash screens are used during app launch.", "long"); } //return... return thisScreensView; } ----------------------------------------------------------------------------- with some or all of the following code: ----------------------------------------------------------------------------- public class SplashActivity extends Activity { private static int SPLASH_TIME_OUT = 3000; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.activity_splash); new Handler().postDelayed(new Runnable() { @Override public void run() { Intent i = new Intent(getApplicationContext(), MainActivity.class); startActivity(i); } }, SPLASH_TIME_OUT); } ----------------------------------------------------------------------------- If you can help please do, if not it's no problem you have already been helpful for the important part, by now i've gotten used to the black screen i'm just going to have to keep it. Thanks
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
12/04/14 04:23 AM (9 years ago)
>now i've gotten used to the black screen i'm just going to have to keep it. Good, let us leave it at that!
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.