Github user sagar15795 commented on a diff in the pull request:

    
https://github.com/apache/incubator-taverna-mobile/pull/66#discussion_r172019762
  
    --- Diff: 
app/src/main/java/org/apache/taverna/mobile/ui/TutorialActivity.java ---
    @@ -0,0 +1,218 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +package org.apache.taverna.mobile.ui;
    +
    +import android.content.Context;
    +import android.content.Intent;
    +import android.graphics.Color;
    +import android.os.Build;
    +import android.os.Bundle;
    +import android.support.v4.view.PagerAdapter;
    +import android.support.v4.view.ViewPager;
    +import android.support.v7.app.AppCompatActivity;
    +import android.text.Html;
    +import android.view.LayoutInflater;
    +import android.view.View;
    +import android.view.ViewGroup;
    +import android.view.Window;
    +import android.view.WindowManager;
    +import android.widget.Button;
    +import android.widget.LinearLayout;
    +import android.widget.TextView;
    +
    +import org.apache.taverna.mobile.R;
    +import org.apache.taverna.mobile.utils.PreferencesManager;
    +
    +import butterknife.BindView;
    +import butterknife.ButterKnife;
    +
    +public class TutorialActivity extends AppCompatActivity {
    +
    +    @BindView(R.id.view_pager)
    +    ViewPager viewPager;
    +
    +    @BindView(R.id.layoutDots)
    +    LinearLayout dotsLayout;
    +
    +    @BindView(R.id.btn_skip)
    +    Button bSkip;
    +
    +    @BindView(R.id.btn_next)
    +    Button bNext;
    +
    +
    +    ViewPagerAdapter viewPagerAdapter;
    +    TextView[] dots;
    +    int[] layouts;
    +    PreferencesManager preferencesManager;
    +
    +    @Override
    +    protected void onCreate(Bundle savedInstanceState) {
    +        super.onCreate(savedInstanceState);
    +        preferencesManager = new PreferencesManager(this);
    +        if (!preferencesManager.isFirstTimeLaunch()) {
    +            launchFlashScreen();
    +            finish();
    +        }
    +
    +        setContentView(R.layout.activity_tutorial);
    +
    +        ButterKnife.bind(this);
    +
    +        if (Build.VERSION.SDK_INT >= 21) {
    +            getWindow().getDecorView()
    +                    
.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE
    +                                            | 
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
    +        }
    +
    +
    +        // layouts of all tutorial sliders
    +        layouts = new int[]{
    +                R.layout.tutorial_slide1,
    +                R.layout.tutorial_slide2,
    +                R.layout.tutorial_slide3,
    +                R.layout.tutorial_slide4};
    +
    +        addBottomDots(0);
    +
    +        changeStatusBarColor();
    +
    +        viewPagerAdapter = new ViewPagerAdapter();
    +        viewPager.setAdapter(viewPagerAdapter);
    +        viewPager.addOnPageChangeListener(viewPagerPageChangeListener);
    +
    +        bSkip.setOnClickListener(new View.OnClickListener() {
    +            @Override
    +            public void onClick(View v) {
    +                launchFlashScreen();
    +            }
    +        });
    +
    +        bNext.setOnClickListener(new View.OnClickListener() {
    --- End diff --
    
    use '@OnClick' butterknife function 


---

Reply via email to