Skip to content

can not slide one fragment to another  #14

Description

@Realwishall

I am very new to android development only made small project which i need to work for my physics classes

i am facing isshu that is.
i am stuck on first fragment and can not go to any other page and on this page only cancel button is working...
this is my code

package com.example.demoreel;

import androidx.appcompat.app.AppCompatActivity;

import android.Manifest;
import android.graphics.Color;
import android.os.Bundle;
import android.widget.Toast;

import com.hololo.tutorial.library.PermissionStep;
import com.hololo.tutorial.library.Step;
import com.hololo.tutorial.library.TutorialActivity;

public class MyTuorialSlider extends TutorialActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
   // setContentView(R.layout.activity_my_tuorial_slider);
    addFragment(
            new PermissionStep
                    .Builder()
                    .setPermissions(new String[]{Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE})
                    .setTitle(getString(R.string.permission_title)).setContent(getString(R.string.permission_detail))
                    .setBackgroundColor(Color.parseColor("#FF0957"))
                    .setDrawable(R.drawable.ss_1)
                    .setSummary(getString(R.string.continue_and_learn))
                    .build());
    addFragment(
            new Step.Builder()
                    .setTitle(getString(R.string.automatic_data))
                    .setContent(getString(R.string.gm_finds_photos))
                    .setBackgroundColor(Color.parseColor("#FF0957"))
                    .setDrawable(R.drawable.ss_1)
                    .setSummary(getString(R.string.continue_and_learn))
                    .build());
    addFragment(
            new Step.Builder()
                    .setTitle(getString(R.string.choose_the_song))
                    .setContent(getString(R.string.swap_to_the_tab))
                    .setBackgroundColor(Color.parseColor("#00D4BA"))
                    .setDrawable(R.drawable.ss_2)
                    .setSummary(getString(R.string.continue_and_update))
                    .build());
    addFragment(
            new Step.Builder()
                    .setTitle(getString(R.string.edit_data))
                    .setContent(getString(R.string.update_easily))
                    .setBackgroundColor(Color.parseColor("#1098FE"))
                    .setDrawable(R.drawable.ss_2)
                    .setSummary(getString(R.string.continue_and_result))
                    .build());
    addFragment(
            new Step.Builder()
                    .setTitle(getString(R.string.result_awesome))
                    .setContent(getString(R.string.after_updating))
                    .setBackgroundColor(Color.parseColor("#CA70F3"))
                    .setDrawable(R.drawable.ss_1)
                    .setSummary(getString(R.string.thank_you))
                    .build());
    setPrevText("LAST"); // Previous button text
    setNextText("NEXT"); // Next button text
    setFinishText("ENTER"); // Finish button text
   // setCancelText("Heelo cance"); // Cancel button text
    //setIndicatorSelected(int drawable); // Indicator drawable when selected
    //setIndicator(int drawable); // Indicator drawable
    setGivePermissionText("DONE"); // Permission button text
    Toast.makeText(getApplicationContext(),"Play",Toast.LENGTH_LONG).show();
}

@Override
public void finishTutorial() {
    Toast.makeText(this, "Tutorial finished", Toast.LENGTH_SHORT).show();
    finish();
}

@Override
public void currentFragmentPosition(int position) {
    Toast.makeText(this, "Position : " + position, Toast.LENGTH_SHORT).show();
}

}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions