Commit a64a9ecb authored by Luboš Horáček's avatar Luboš Horáček
Browse files

Todo

parent 2d82bfb6
......@@ -255,7 +255,7 @@ public class MainActivity extends FragmentActivity implements MenuActivity {
loaderFragment = fragmentToReplace;
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
fragmentTransaction.setCustomAnimations(inAnimation, outAnimation);
fragmentTransaction.replace(R.id.main_screen_preloader, loaderFragment, loaderFragment.getClass().toString());
fragmentTransaction.replace(R.id.main_screen_preloader, loaderFragment, loaderFragment.getClass().getName());
fragmentTransaction.commit();
}
......@@ -299,7 +299,7 @@ public class MainActivity extends FragmentActivity implements MenuActivity {
@Override
public Fragment replaceScreenFragment(MenuEnum menuEnum, final AbstractMenuFragment fragment, boolean forceReplace, boolean forceQuickTransition, final MenuChangeListener menuChangeListener) {
if (findViewById(MAIN_SCREEN_CONTAINER_ID) != null) {
AbstractMenuFragment usedFragment = (AbstractMenuFragment) getSupportFragmentManager().findFragmentByTag(fragment.getClass().toString());
AbstractMenuFragment usedFragment = (AbstractMenuFragment) getSupportFragmentManager().findFragmentByTag(fragment.getClass().getName());
if ((usedFragment != null) && usedFragment.isVisible() && !forceReplace) {
return usedFragment;
}
......@@ -315,13 +315,12 @@ public class MainActivity extends FragmentActivity implements MenuActivity {
});
}
if (forceQuickTransition || getTablexiaContext().isScreenContentHidden()) {
getSupportFragmentManager().beginTransaction().replace(MAIN_SCREEN_CONTAINER_ID, fragment, fragment.getClass().toString()).commit();
getSupportFragmentManager().beginTransaction().replace(MAIN_SCREEN_CONTAINER_ID, fragment, fragment.getClass().getName()).commit();
} else {
getTablexiaContext().hideScreenContent(true, new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
getSupportFragmentManager().beginTransaction().replace(MAIN_SCREEN_CONTAINER_ID, fragment, fragment.getClass().toString()).commitAllowingStateLoss();
getSupportFragmentManager().beginTransaction().replace(MAIN_SCREEN_CONTAINER_ID, fragment, fragment.getClass().getName()).commit();
}
});
......
/*******************************************************************************
* Tablexia
*
*
* Copyright (C) 2013 CZ NIC z.s.p.o. <podpora at nic dot cz>
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
......@@ -165,7 +165,7 @@ public class BaseGameMenuFragment extends GameMenuFragment implements OnClickLis
/**
* Prepares start button
*
*
* @param layout
* @param imageResourceId
*/
......@@ -176,7 +176,7 @@ public class BaseGameMenuFragment extends GameMenuFragment implements OnClickLis
/**
* Prepares start button
*
*
* @param layout
* @param imageResourceId
*/
......@@ -189,7 +189,7 @@ public class BaseGameMenuFragment extends GameMenuFragment implements OnClickLis
/**
* Prepares difficulty seekbar
*
*
* @param layout
*/
private void prepareDifficultySeekBar(View layout) {
......
......@@ -205,6 +205,7 @@ public class StartMenu extends GameMenuFragment implements OnTouchListener {
Bitmap sourceBitmap = ((BitmapDrawable) getResources().getDrawable(R.drawable.screen_gamemenu_startmenu_clickablemap)).getBitmap();
hotspots = Bitmap.createScaledBitmap(sourceBitmap, size.x, size.y, false);
// TODO scale click coordinates
}
@Override
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment