Convert IntroActivity to Kotlin (#520)

pull/535/head
olegivo 6 years ago committed by Alinson Xavier
parent 9199a64d73
commit 2fb9168686

@ -17,52 +17,41 @@
* with this program. If not, see <http://www.gnu.org/licenses/>. * with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package org.isoron.uhabits.activities.intro; package org.isoron.uhabits.activities.intro
import android.graphics.*; import android.graphics.*
import android.os.*; import android.os.*
import com.github.paolorotolo.appintro.*; import com.github.paolorotolo.appintro.*
import org.isoron.uhabits.R; import org.isoron.uhabits.R
/** /**
* Activity that introduces the app to the user, shown only after the app is * Activity that introduces the app to the user, shown only after the app is
* launched for the first time. * launched for the first time.
*/ */
public class IntroActivity extends AppIntro2 class IntroActivity : AppIntro2() {
{ override fun init(savedInstanceState: Bundle?) {
@Override showStatusBar(false)
public void init(Bundle savedInstanceState)
{
showStatusBar(false);
addSlide(AppIntroFragment.newInstance(getString(R.string.intro_title_1), addSlide(AppIntroFragment.newInstance(getString(R.string.intro_title_1),
getString(R.string.intro_description_1), R.drawable.intro_icon_1, getString(R.string.intro_description_1), R.drawable.intro_icon_1,
Color.parseColor("#194673"))); Color.parseColor("#194673")))
addSlide(AppIntroFragment.newInstance(getString(R.string.intro_title_2), addSlide(AppIntroFragment.newInstance(getString(R.string.intro_title_2),
getString(R.string.intro_description_2), R.drawable.intro_icon_2, getString(R.string.intro_description_2), R.drawable.intro_icon_2,
Color.parseColor("#ffa726"))); Color.parseColor("#ffa726")))
addSlide(AppIntroFragment.newInstance(getString(R.string.intro_title_4), addSlide(AppIntroFragment.newInstance(getString(R.string.intro_title_4),
getString(R.string.intro_description_4), R.drawable.intro_icon_4, getString(R.string.intro_description_4), R.drawable.intro_icon_4,
Color.parseColor("#9575cd"))); Color.parseColor("#9575cd")))
} }
@Override override fun onNextPressed() {}
public void onNextPressed()
{
}
@Override override fun onDonePressed() {
public void onDonePressed() finish()
{
finish();
} }
@Override override fun onSlideChanged() {}
public void onSlideChanged()
{
}
} }
Loading…
Cancel
Save