Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8436787
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:16:37+00:00 2026-06-10T07:16:37+00:00

Code for QuizSplashActivity : package com.androidbook.triviaquiz; import java.text.DateFormat; import java.util.Date; import android.content.Intent; import android.content.SharedPreferences;

  • 0

Code for QuizSplashActivity:

package com.androidbook.triviaquiz;

import java.text.DateFormat;
import java.util.Date;

import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.view.animation.AnimationUtils;
import android.view.animation.LayoutAnimationController;
import android.widget.TableLayout;
import android.widget.TableRow;
import android.widget.TextView;

public class QuizSplashActivity extends QuizActivity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        String rest="First Time Launched";



        String launchd=DateFormat.getDateInstance().format(new Date());
        String launcht=DateFormat.getTimeInstance().format(new Date());
        String ldt=launchd+" "+launcht;

        SharedPreferences set=getSharedPreferences(GAME_PREFERENCES,MODE_PRIVATE);
        if(set.contains("lastLaunch"))
        {rest=set.getString("lastLaunch", "default");

        }
        Log.i("LaunchInfo",rest);

        SharedPreferences.Editor edit=set.edit();

        edit.putString("lastLaunch",ldt);
        edit.commit();


        setContentView(R.layout.splash);
        anime();
    }

    private void anime()
    {TextView t1=(TextView)findViewById(R.id.TextViewTopTitle);
    Animation f1=AnimationUtils.loadAnimation(this, R.anim.fade_in);
    t1.startAnimation(f1);
    TextView t2=(TextView)findViewById(R.id.TextViewBotTitle);
    Animation f2=AnimationUtils.loadAnimation(this, R.anim.fade_in2);

    //t2.startAnimation(f2);
   // Animation fade2 =AnimationUtils.loadAnimation(this, R.anim.fade_in2);
    //View.startAnimation(fade2);
    t2.startAnimation(f2);

    AnimationListener animListener=new AnimationListener() {
        public void onAnimationEnd(Animation animation){
            startActivity(new Intent(QuizSplashActivity.this,QuizMenuActivity.class));
            QuizSplashActivity.this.finish();

        }


        public void onAnimationRepeat(Animation animation) {
        }

        public void onAnimationStart(Animation animation) {
        }


    };
    f2.setAnimationListener(animListener);
    Animation spinin=AnimationUtils.loadAnimation(this,R.anim.custom_anim);
    LayoutAnimationController controller=new LayoutAnimationController(spinin);
    TableLayout tb=(TableLayout) findViewById(R.id.tableLayout1);
    for(int i=0;i<tb.getChildCount();i++)
    {TableRow row=(TableRow) tb.getChildAt(i);
    row.setLayoutAnimation(controller);

    }


    }
    @Override
    protected void onPause()
    {super.onPause();
    TextView t1=(TextView)findViewById(R.id.TextViewTopTitle);
    t1.clearAnimation();
    TextView t2 =(TextView)findViewById(R.id.TextViewBotTitle);
    t2.clearAnimation();
    TableLayout tb=(TableLayout) findViewById(R.id.tableLayout1);
    for(int i=0;i<tb.getChildCount();i++)
    {TableRow row=(TableRow) tb.getChildAt(i);
    row.clearAnimation();

    }


    }
    @Override
    protected void onResume()
    {super.onResume();
    anime();

    }


}

Code for QuizMenuActivity

package com.androidbook.triviaquiz;


import android.os.Bundle;

public class QuizMenuActivity extends QuizActivity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.menu);
    }
}

After the animations in splash have played out (Specifically fade_in2) the QuizMenuActivity is supposed to be launched and splash finished. The Animations play out fine but the QuizMenuActivity doesn’t seem to be launched. Playing around with the debugger/break points it seems the program flow never goes into onAnimationEnd (Animation animation) method. Though I might be wrong as I am pretty new with eclipse and android.

I’ve fixed the code based on the first reply and updated it.Now the listner is firing but after the start activity i get ‘application has beenstopped unexpectedly.Please try again.Force Close’.Seems to be while in something called ZygoteInit$MethodAnd.

Is this the callstack:

tiv [Android Application]   
    DalvikVM[localhost:8612]    
        Thread [<3> main] (Running) 
        Thread [<13> Binder Thread #2] (Running)    
        Thread [<11> Binder Thread #1] (Running)    

I think the callstacks supposed to be in the logcat but I’m getting ‘Unable to open stack trace file ‘/data/anr/traces.txt’: Permission denied’ error log in logcat.
Also the appliction seems to crash before the the animation f2(which is what is being listened for) has been displayed.t2 never gets displayed.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T07:16:38+00:00Added an answer on June 10, 2026 at 7:16 am

    -change manifest to this
    -It solved my problem
    -add dot in the beginning of activity name, not sure why or if it is necessary !

    <?xml version="1.0" encoding="utf-8"?>
    <manifest
        xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.androidbook.triviaquiz7"
        android:versionCode="1"
        android:versionName="1.0">
    <application
        android:label="@string/app_name"
        android:debuggable="true"
        android:icon="@drawable/quizicon">
        <activity
            android:name=".QuizSplashActivity"
            android:label="@string/app_name">
            <intent-filter>
                <action
                    android:name="android.intent.action.MAIN" />
                <category
                    android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".QuizGameActivity"></activity>
        <activity
            android:name=".QuizSettingsActivity"></activity>
        <activity
            android:name=".QuizScoresActivity"></activity>
        <activity
            android:name=".QuizHelpActivity"></activity>
        <activity
            android:name=".QuizMenuActivity"></activity>
    </application>
    <uses-sdk
        android:minSdkVersion="7" />
    

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Code: String message = MessageFormat.format(error {0},e); E.g. message: java.text.ParseException: Unparseable date: sdf sf sa
Code in here: jsfiddle Demo I wanna to get the div#content height when it
code id date time difference AiK4JJ kcy2000ok 2012-01-31 17:25:41 13 unBG1D gktoql 2012-01-31 17:25:35
Code like: ...text <span contenteditable=true onChange=someFunction()>blah blah</span> text... The onChange event doesn't work. (at
Code: ArrayList <Integer> marks = new ArrayList(); private void addButtonActionPerformed(java.awt.event.ActionEvent evt) { Collections.addAll(marks, (Integer.parseInt(markInput.getText())));
Code: digits.each do |digit| puts digit.content #&0000000000032056.00000032 056 value = digit.content[24..-1].strip puts value #32
Code: for i in {0..3}; do ping http://www.pythonchallenge.com/pc/def/$i.html; done A host should be found
Code and preview: <html> <head> <title>Testing some CSS</title> <style type=text/css> .dDay { font-size:205% }
Code is here: http://jsfiddle.net/nNdna/ live page is here: http://www.sumsy.com/demos/socialFeeds/ Please go to the live
code: http://jsfiddle.net/WRppV/4/ I should get something like content=> [141, [203, 206, 204, 205], 142,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.