Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
labs
Tablexia-old
Commits
87e73080
Commit
87e73080
authored
Dec 05, 2014
by
Luboš Horáček
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Oprava pozice bublin
parent
c35b70b5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
27 deletions
+26
-27
res/layout/newuser_dialog_newspaper.xml
res/layout/newuser_dialog_newspaper.xml
+1
-1
src/main/java/cz/nic/tablexia/menu/mainmenu/MainMenu.java
src/main/java/cz/nic/tablexia/menu/mainmenu/MainMenu.java
+24
-26
src/main/java/cz/nic/tablexia/newusers/fragment/NewspaperDialog.java
...va/cz/nic/tablexia/newusers/fragment/NewspaperDialog.java
+1
-0
No files found.
res/layout/newuser_dialog_newspaper.xml
View file @
87e73080
...
...
@@ -103,7 +103,7 @@
android:textSize=
"@dimen/newuseranim_newspaper_topic_fontsize"
android:visibility=
"gone"
custom:displayRatioType=
"height"
custom:xPositionRatio=
"0.1
5
"
custom:xPositionRatio=
"0.1
7
"
custom:yPositionRatio=
"0.1"
/>
</RelativeLayout>
\ No newline at end of file
src/main/java/cz/nic/tablexia/menu/mainmenu/MainMenu.java
View file @
87e73080
/*******************************************************************************
* 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/>.
******************************************************************************/
package
cz.nic.tablexia.menu.mainmenu
;
import
android.app.Activity
;
...
...
@@ -53,17 +54,17 @@ import cz.nic.tablexia.widget.TablexiaDrawerLayout.DrawerListenerAdapter;
/**
* Main menu control class.
*
*
* @author Matyáš Latner
*/
public
class
MainMenu
extends
AbstractMenu
implements
OnGroupClickListener
,
OnChildClickListener
,
OnItemSelectedListener
,
OnGroupCollapseListener
,
OnGroupExpandListener
{
private
ExpandableListView
mainMenuListView
;
private
MainMenuAdapter
mainMenuAdapter
;
private
CommonUserAdapter
userSpinnerAdapter
;
private
Spinner
userSpinner
;
private
SoundControl
soundControl
;
private
boolean
menuClickableLock
=
true
;
private
ExpandableListView
mainMenuListView
;
private
MainMenuAdapter
mainMenuAdapter
;
private
CommonUserAdapter
userSpinnerAdapter
;
private
Spinner
userSpinner
;
private
SoundControl
soundControl
;
private
boolean
menuClickableLock
=
true
;
private
final
Tablexia
tablexiaContext
;
public
MainMenu
(
Tablexia
tablexiaContext
)
{
...
...
@@ -121,7 +122,7 @@ public class MainMenu extends AbstractMenu implements OnGroupClickListener, OnCh
Integer
parameter
=
null
;
Intent
intent
=
tablexiaContext
.
getCurrentMenuActivity
().
getIntent
();
if
(
intent
!=
null
)
{
if
(
intent
!=
null
)
{
Bundle
extras
=
intent
.
getExtras
();
if
(
extras
!=
null
)
{
parameter
=
extras
.
getInt
(
MainMenuDefinition
.
MAIN_MENU_SCREEN_PARAMETER_KEY
);
...
...
@@ -149,10 +150,9 @@ public class MainMenu extends AbstractMenu implements OnGroupClickListener, OnCh
collapseAllMenu
(
tablexiaContext
);
}
/**
* Change selected menu and main screen if its needed
*
*
* @param menuItem menu item to change
* @param forceReplace <code>true</code> for force of replace menu item
* @param forceChange force menu change
...
...
@@ -164,7 +164,7 @@ public class MainMenu extends AbstractMenu implements OnGroupClickListener, OnCh
/**
* Change selected menu and main screen if its needed
*
*
* @param menuItem menu item to change
* @param forceReplace <code>true</code> for force of replace menu item
* @param forceChange force menu change
...
...
@@ -188,7 +188,7 @@ public class MainMenu extends AbstractMenu implements OnGroupClickListener, OnCh
/**
* Returns <code>true</code> if menu item in parameter is same as active menu item
*
*
* @param mainMenuItem menu item to check if is active
* @return <code>true</code> if menu item in parameter is same as active menu item
*/
...
...
@@ -198,7 +198,7 @@ public class MainMenu extends AbstractMenu implements OnGroupClickListener, OnCh
/**
* Returns selected menu item enum
*
*
* @return selected menu item enum
*/
public
MenuEnum
getSelectedMenuItem
()
{
...
...
@@ -207,7 +207,7 @@ public class MainMenu extends AbstractMenu implements OnGroupClickListener, OnCh
/**
* Sets active menu item.
*
*
* @param mainMenuItem menu item to set as active
*/
public
void
changeActiveMenuItem
(
MenuEnum
mainMenuItem
)
{
...
...
@@ -335,13 +335,13 @@ public class MainMenu extends AbstractMenu implements OnGroupClickListener, OnCh
@Override
public
void
positiveAction
()
{
//
tablexiaContext.showNewUserScreen();
//TODO add code for starting animation on new user click from game menu while user logged in
// tablexiaContext.showNewUserScreen();
//
TODO add code for starting animation on new user click from game menu while user logged in
Bundle
args
=
new
Bundle
();
args
.
putString
(
"NEWUSER_GAMEMENU"
,
"NEWUSER_GAMEMENU"
);
((
MainActivity
)
tablexiaContext
.
getCurrentMenuActivity
()).
showLoadingScreen
(
true
,
args
);
tablexiaContext
.
changeMenu
(
AbstractMenu
.
USER_MENU
);
((
MainActivity
)
tablexiaContext
.
getCurrentMenuActivity
()).
lockCloseMenuDrawer
();
tablexiaContext
.
changeMenu
(
AbstractMenu
.
USER_MENU
);
userSpinner
.
setSelection
(
userSpinnerAdapter
.
getUserPositionInList
(
tablexiaContext
.
getCurrentMenuActivity
().
getTablexiaContext
().
getSelectedUser
().
getNickName
()));
tablexiaContext
.
getTablexiaState
().
setAndSaveActiveUser
(
null
);
super
.
positiveAction
();
...
...
@@ -351,7 +351,7 @@ public class MainMenu extends AbstractMenu implements OnGroupClickListener, OnCh
}
else
{
tablexiaContext
.
doSelectUser
(
userSpinnerAdapter
.
getUserAtPosition
(
position
));
((
TextView
)
view
.
findViewById
(
R
.
id
.
usermenu_text
)).
setTypeface
(
Typeface
.
DEFAULT
);
((
TextView
)
view
.
findViewById
(
R
.
id
.
usermenu_text
)).
setTypeface
(
Typeface
.
DEFAULT
);
view
.
findViewById
(
R
.
id
.
usermenu_selector
).
setVisibility
(
View
.
GONE
);
}
}
...
...
@@ -365,7 +365,7 @@ public class MainMenu extends AbstractMenu implements OnGroupClickListener, OnCh
/**
* Main menu adapter.
*
*
* @author Matyáš Latner
*/
public
class
MainMenuAdapter
extends
BaseExpandableListAdapter
{
...
...
@@ -413,9 +413,7 @@ public class MainMenu extends AbstractMenu implements OnGroupClickListener, OnCh
// show menu selected/unselected icon
int
menuIconResourceId
=
-
1
;
final
ImageView
itemImage
=
(
ImageView
)
convertView
.
findViewById
(
MAINMENU_GROUPITEM_IMAGE_ID
);
if
(
isActiveMenuItem
(
MainMenuDefinition
.
getMenuItemAtPosition
(
position
))
||
(
isActiveMenuItem
(
MainMenuDefinition
.
START
)
&&
(
MainMenuDefinition
.
getMenuItemAtPosition
(
position
)
==
MainMenuDefinition
.
GAMES
))
||
((
getSelectedMenuItem
()
instanceof
GamesDefinition
)
&&
(
MainMenuDefinition
.
getMenuItemAtPosition
(
position
)
==
MainMenuDefinition
.
GAMES
)))
{
if
(
isActiveMenuItem
(
MainMenuDefinition
.
getMenuItemAtPosition
(
position
))
||
(
isActiveMenuItem
(
MainMenuDefinition
.
START
)
&&
(
MainMenuDefinition
.
getMenuItemAtPosition
(
position
)
==
MainMenuDefinition
.
GAMES
))
||
((
getSelectedMenuItem
()
instanceof
GamesDefinition
)
&&
(
MainMenuDefinition
.
getMenuItemAtPosition
(
position
)
==
MainMenuDefinition
.
GAMES
)))
{
menuIconResourceId
=
MainMenuDefinition
.
getMenuItemAtPosition
(
position
).
getMenuIconSelectedResourceId
();
}
else
{
...
...
src/main/java/cz/nic/tablexia/newusers/fragment/NewspaperDialog.java
View file @
87e73080
...
...
@@ -57,6 +57,7 @@ public class NewspaperDialog extends TablexiaDialog {
@Override
public
void
onClick
(
View
v
)
{
LocalBroadcastManager
.
getInstance
(
getActivity
()).
sendBroadcast
(
new
Intent
(
"cz.nic.tablexia.action.SLIDE_NEWSPAPER"
));
dismiss
();
}
});
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment