Back to project page Paginize.
The source code is released under:
Copyright (c) 2014 neevek <i at neevek.net> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal ...
If you think the Android project Paginize listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package net.neevek.android.demo.paginize.pages.other; //w ww . j a v a2 s . c o m import android.view.MotionEvent; import android.view.View; import android.widget.Button; import net.neevek.android.demo.paginize.R; import net.neevek.android.lib.paginize.Page; import net.neevek.android.lib.paginize.PageActivity; import net.neevek.android.lib.paginize.annotation.InjectView; import net.neevek.android.lib.paginize.annotation.PageLayout; @PageLayout(R.layout.page_alert) public class AlertPage extends Page implements View.OnClickListener { @InjectView(value = R.id.btn_confirm, listenerTypes = {View.OnClickListener.class}) private Button mBtnConfirm; public AlertPage(PageActivity pageActivity) { super(pageActivity); setType(Page.TYPE.TYPE_DIALOG); interceptAllTouchEvents(); } private void interceptAllTouchEvents() { getView().setOnTouchListener(new View.OnTouchListener() { public boolean onTouch(View v, MotionEvent event) { return true; } }); } @Override public void onClick(View v) { switch (v.getId()) { case R.id.btn_confirm: hide(); break; } } @Override public boolean onBackPressed() { hide(); return true; } }