Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slider cannot open screens #305

Open
ahmadraza330 opened this issue Dec 31, 2020 · 2 comments
Open

Slider cannot open screens #305

ahmadraza330 opened this issue Dec 31, 2020 · 2 comments
Labels

Comments

@ahmadraza330
Copy link

ahmadraza330 commented Dec 31, 2020

20201231_112417_768x432.1.mp4

I am unable to open next screen in slider please help me.

This is my mainActivity.java file

`package com.example.budget.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.example.budget.R;
import com.heinrichreimersoftware.materialintro.app.IntroActivity;
import com.heinrichreimersoftware.materialintro.slide.FragmentSlide;

public class MainActivity extends IntroActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
       // setContentView(R.layout.activity_main);
        setButtonBackVisible(false);
        setButtonNextVisible(false);

        addSlide(new FragmentSlide.Builder()
                .background(android.R.color.white)
                .fragment(R.layout.intro_1)
                .build());
        addSlide(new FragmentSlide.Builder()
                .background(android.R.color.white)
                .fragment(R.layout.intro_2)
                .build());
        addSlide(new FragmentSlide.Builder()
                .background(android.R.color.white)
                .fragment(R.layout.intro_3)
                .build());
        addSlide(new FragmentSlide.Builder()
                .background(android.R.color.white)
                .fragment(R.layout.intro_4)
                .build());
        addSlide(new FragmentSlide.Builder()
                .background(android.R.color.white)
                .fragment(R.layout.intro_register)
                .canGoBackward(false)
                .build());
    }

    public void btnRegister(View view) {
        startActivity(new Intent(this, RegisterActivity.class));
    }
    public void btnLogin(View view) {
        startActivity(new Intent(this, LoginActivity.class));
    }
}`

This is Register.java Activity

`package com.example.budget.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;

import com.example.budget.R;

public class RegisterActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_register);
}

}`

This is Manifest.xml
`

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/Theme.Intro">
    <activity android:name=".activity.RegisterActivity"></activity>
    <activity android:name=".activity.LoginActivity" />
    <activity android:name=".activity.MainActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

`

@heinrichreimer
Copy link
Owner

Have you been able to start RegisterActivity and LoginActivity from a blank/test Activity? And have you been able to start a blank/test Activity from the intro?
As you're using custom fragments rather than the included slides, could you include the fragment layout XML?

@ahmadraza330
Copy link
Author

ahmadraza330 commented Jan 4, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants