This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Constants for tablet sized ads (728x90) | |
//AdMob name: LEADERBOARD | |
final int IAB_LEADERBOARD_WIDTH = 728; | |
final int IAB_LEADERBOARD_HEIGHT = 90; | |
//AdMob name: FULL_BANNER | |
final int MED_BANNER_WIDTH = 480; | |
final int MED_BANNER_HEIGHT = 60; | |
//Constants for phone sized ads (320x50) | |
//AdMob name: BANNER | |
final int BANNER_AD_WIDTH = 320; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Before | |
for($i = $pagenum-4; $i < $pagenum; $i++){ | |
if($i > 0){ | |
$paginationCtrls .= '<a href="'.$_SERVER['PHP_SELF'].'?pn='.$i.'">'.$i.'</a> '; | |
} | |
} | |
//After | |
for ($i = max($page_number - 4, 1); $i < $page_number; $i++) { | |
$paginationCtrls .= '<a href="' . $_SERVER['PHP_SELF'] . '/page/' . $i . '">' . $i . '</a> '; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// If over 6 pages away from the first page, add a quick link to the first page | |
if ($page_number > 6) { | |
$paginationCtrls .= '<a href="' . $_SERVER['PHP_SELF'] . '/page/1">1</a> ... '; | |
} | |
// If over 5 pages away from the last page, add a quick link to the last page | |
if ($page_number < $last_page - 5) { | |
$paginationCtrls .= ' ... <a href="' . $_SERVER['PHP_SELF'] . '/page/' . $last_page . '">' . $last_page . '</a> '; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Credits: | |
//http://www.helloandroid.com/tutorials/how-display-custom-dialog-your-android-application | |
//https://gist.github.com/3087486 | |
private void whatsNewDialog() { | |
//requestWindowFeature(Window.FEATURE_NO_TITLE); | |
//Dialog dialog = new Dialog(main.this); | |
final Dialog dialog = new Dialog(this, R.style.NoTitleDialog); | |
dialog.setContentView(R.layout.whatsnew); | |
//dialog.setTitle(getString(R.string.app_name) + " v" + currentAppVersion); | |
dialog.setCancelable(false); |