23
Contents Class CustomActivity ................................................................................................................................. 2 Field Detail .................................................................................................................................... 3 Constructor Detail ......................................................................................................................... 3 Method Detail ............................................................................................................................... 3 Class Data ................................................................................................................................................. 5 Field Detail .................................................................................................................................... 5 Constructor Detail ......................................................................................................................... 6 Method Detail ............................................................................................................................... 6 Class Live ................................................................................................................................................. 7 Constructor Detail ......................................................................................................................... 8 Method Detail ............................................................................................................................... 8 Class MainActivity ..................................................................................................................................... 8 o Nested Class Summary .................................................................................................................. 9 Field Detail .................................................................................................................................... 9 Constructor Detail ......................................................................................................................... 9 Method Detail ............................................................................................................................... 9 Class News............................................................................................................................................... 11 o Nested Class Summary ................................................................................................................ 11 Field Detail .................................................................................................................................. 11 Constructor Detail ....................................................................................................................... 12 Method Detail ............................................................................................................................. 12 Class NewsDetail ..................................................................................................................................... 13 Constructor Detail ....................................................................................................................... 13 Method Detail ............................................................................................................................. 13 Class Players ........................................................................................................................................... 14 Field Detail .................................................................................................................................. 14 Constructor Detail ....................................................................................................................... 14 Method Detail ............................................................................................................................. 14 Class SplashScreen ................................................................................................................................. 16

Contentsmyappsdoc.myapptemplates.com.s3-us-west-2.amazonaws.com/... · 2014-08-26 · com.football.ui Class Live public class Live extends android.support.v4.app.Fragment implements

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Contentsmyappsdoc.myapptemplates.com.s3-us-west-2.amazonaws.com/... · 2014-08-26 · com.football.ui Class Live public class Live extends android.support.v4.app.Fragment implements

Contents Class CustomActivity ................................................................................................................................. 2

Field Detail .................................................................................................................................... 3

Constructor Detail ......................................................................................................................... 3

Method Detail ............................................................................................................................... 3

Class Data ................................................................................................................................................. 5

Field Detail .................................................................................................................................... 5

Constructor Detail ......................................................................................................................... 6

Method Detail ............................................................................................................................... 6

Class Live ................................................................................................................................................. 7

Constructor Detail ......................................................................................................................... 8

Method Detail ............................................................................................................................... 8

Class MainActivity ..................................................................................................................................... 8

o Nested Class Summary .................................................................................................................. 9

Field Detail .................................................................................................................................... 9

Constructor Detail ......................................................................................................................... 9

Method Detail ............................................................................................................................... 9

Class News............................................................................................................................................... 11

o Nested Class Summary ................................................................................................................ 11

Field Detail .................................................................................................................................. 11

Constructor Detail ....................................................................................................................... 12

Method Detail ............................................................................................................................. 12

Class NewsDetail ..................................................................................................................................... 13

Constructor Detail ....................................................................................................................... 13

Method Detail ............................................................................................................................. 13

Class Players ........................................................................................................................................... 14

Field Detail .................................................................................................................................. 14

Constructor Detail ....................................................................................................................... 14

Method Detail ............................................................................................................................. 14

Class SplashScreen ................................................................................................................................. 16

Page 2: Contentsmyappsdoc.myapptemplates.com.s3-us-west-2.amazonaws.com/... · 2014-08-26 · com.football.ui Class Live public class Live extends android.support.v4.app.Fragment implements

Field Detail .................................................................................................................................. 16

Constructor Detail ....................................................................................................................... 16

Method Detail ............................................................................................................................. 16

Class Stadium .......................................................................................................................................... 17

Field Detail .................................................................................................................................. 17

Constructor Detail ....................................................................................................................... 18

Method Detail ............................................................................................................................. 18

Class Table ............................................................................................................................................... 19

o Nested Class Summary ................................................................................................................ 19

Field Detail .................................................................................................................................. 20

Constructor Detail ....................................................................................................................... 20

Method Detail ............................................................................................................................. 20

Class Teams ............................................................................................................................................. 21

o Nested Class Summary ................................................................................................................ 21

Field Detail .................................................................................................................................. 21

Constructor Detail ....................................................................................................................... 22

Method Detail ............................................................................................................................. 22

Class TouchEffect ................................................................................................................................... 23

Constructor Detail ....................................................................................................................... 23

Method Detail ............................................................................................................................. 23

com.football.custom

Class CustomActivity

Direct Known Subclasses:

Page 3: Contentsmyappsdoc.myapptemplates.com.s3-us-west-2.amazonaws.com/... · 2014-08-26 · com.football.ui Class Live public class Live extends android.support.v4.app.Fragment implements

MainActivity, NewsDetail, Stadium

public class CustomActivity

extends android.support.v4.app.FragmentActivity

implements android.view.View.OnClickListener

This is a common activity that all other activities of the app can extend to

inherit the common behaviors like setting a Theme to activity.

Field Detail o searchView

private android.widget.SearchView searchView

The search view.

o TOUCH

public static final TouchEffect TOUCH

Apply this Constant as touch listener for views to provide alpha touch

effect. The view must have a Non-Transparent background.

Constructor Detail o CustomActivity

public CustomActivity()

Method Detail o setupActionBar

protected void setupActionBar()

This method will setup the top title bar (Action bar) content and display

values. It will also setup the custom background theme for ActionBar.

You can override this method to change the behavior of ActionBar for

particular Activity

o onOptionsItemSelected

Page 4: Contentsmyappsdoc.myapptemplates.com.s3-us-west-2.amazonaws.com/... · 2014-08-26 · com.football.ui Class Live public class Live extends android.support.v4.app.Fragment implements

public boolean onOptionsItemSelected(android.view.MenuItem item)

Overrides:

onOptionsItemSelected in class android.app.Activity

o onClick

public void onClick(android.view.View v)

Specified by:

onClick in interface android.view.View.OnClickListener

o setTouchNClick

public android.view.View setTouchNClick(int id)

Sets the touch and click listeners for a view..

Parameters:

id - the id of View

Returns:

the view

o setClick

public android.view.View setClick(int id)

Sets the click listener for a view.

Parameters:

id - the id of View

Returns:

the view

o setupSearchView

protected void setupSearchView(android.view.Menu menu)

Page 5: Contentsmyappsdoc.myapptemplates.com.s3-us-west-2.amazonaws.com/... · 2014-08-26 · com.football.ui Class Live public class Live extends android.support.v4.app.Fragment implements

Setup the up search view for ActionBar search. The current

implementation simply search for Videos from Youtube. You can

customize this code to search from your API or any TV API.

Parameters:

menu - the ActionBar Menu

o setupSearchViewTheme

protected void setupSearchViewTheme(android.widget.SearchView sea

rchView)

Sets the up search view theme.

Parameters:

searchView - the new up search view theme

com.football.model

Class Data

public class Data

extends java.lang.Object

The Class Data is simple Java bean class that holds two members only to

represent dummy data for app. You can customize or can write new bean

classes as per you needs.

Field Detail o texts

Page 6: Contentsmyappsdoc.myapptemplates.com.s3-us-west-2.amazonaws.com/... · 2014-08-26 · com.football.ui Class Live public class Live extends android.support.v4.app.Fragment implements

private java.lang.String[] texts

The texts.

o resources

private int[] resources

The resources.

Constructor Detail o Data o public Data(java.lang.String[] texts,

int[] resources)

Instantiates a new data.

Parameters:

texts - the texts

resources - the resources

Method Detail o getTexts

public java.lang.String[] getTexts()

Gets the texts.

Returns:

the texts

o setTexts

public void setTexts(java.lang.String[] texts)

Sets the texts.

Parameters:

texts - the new texts

Page 7: Contentsmyappsdoc.myapptemplates.com.s3-us-west-2.amazonaws.com/... · 2014-08-26 · com.football.ui Class Live public class Live extends android.support.v4.app.Fragment implements

o getResources

public int[] getResources()

Gets the resources.

Returns:

the resources

o setResources

public void setResources(int[] resources)

Sets the resources.

Parameters:

resources - the new resources

com.football.ui

Class Live

public class Live

extends android.support.v4.app.Fragment

implements android.view.View.OnClickListener

The Class Live is a Fragment that is displayed in the Main activity when the

user taps on Live tab (5th tab) or when user swipes to Fifth page in ViewPager.

You can customize this fragment's contents as per your need. It just show a

dummy stadium image and dummy score for match.

Page 8: Contentsmyappsdoc.myapptemplates.com.s3-us-west-2.amazonaws.com/... · 2014-08-26 · com.football.ui Class Live public class Live extends android.support.v4.app.Fragment implements

Constructor Detail o Live

public Live()

Method Detail o onCreateView o public android.view.View onCreateView(android.view.LayoutInflater

inflater,

o android.view.ViewGroup container,

android.os.Bundle savedInstanceState)

Overrides:

onCreateView in class android.support.v4.app.Fragment

o onClick

public void onClick(android.view.View v)

Specified by:

onClick in interface android.view.View.OnClickListener

com.football

Class MainActivity

public class MainActivity

extends CustomActivity

The Activity MainActivity is the Main screen of the app and it holds all the

views and Fragments used in the app.

Page 9: Contentsmyappsdoc.myapptemplates.com.s3-us-west-2.amazonaws.com/... · 2014-08-26 · com.football.ui Class Live public class Live extends android.support.v4.app.Fragment implements

o Nested Class Summary

Nested Classes

Modifier and

Type Class and Description

private

class

MainActivity.DummyPageAdapter

The Class DummyPageAdapter is a dummy pager adapter for

ViewPager.

Field Detail o pager

private android.support.v4.view.ViewPager pager

The view pager for swipe views.

o currentTab

private android.view.View currentTab

The current selected tab.

Constructor Detail o MainActivity

public MainActivity()

Method Detail o onCreate

protected void onCreate(android.os.Bundle savedInstanceState)

Overrides:

onCreate in class android.support.v4.app.FragmentActivity

o initTabs

private void initTabs()

Initialize the tabs. You can write your code related to Tabs.

Page 10: Contentsmyappsdoc.myapptemplates.com.s3-us-west-2.amazonaws.com/... · 2014-08-26 · com.football.ui Class Live public class Live extends android.support.v4.app.Fragment implements

o onClick

public void onClick(android.view.View v)

Specified by:

onClick in interface android.view.View.OnClickListener

Overrides:

onClick in class CustomActivity

o setCurrentTab

private void setCurrentTab(int page)

Sets the current selected tab. Called whenever a Tab is selected either

by clicking on Tab button or by swiping the ViewPager. You can write

your code related to tab selection actions.

Parameters:

page - the current page of ViewPager

o initPager

private void initPager()

Initialize the ViewPager. You can customize this method for writing the

code related to view pager actions.

o onCreateOptionsMenu

public boolean onCreateOptionsMenu(android.view.Menu menu)

Overrides:

onCreateOptionsMenu in class android.app.Activity

o onOptionsItemSelected

public boolean onOptionsItemSelected(android.view.MenuItem item)

Overrides:

onOptionsItemSelected in class CustomActivity

Page 11: Contentsmyappsdoc.myapptemplates.com.s3-us-west-2.amazonaws.com/... · 2014-08-26 · com.football.ui Class Live public class Live extends android.support.v4.app.Fragment implements

com.football.ui

Class News

public class News

extends android.support.v4.app.Fragment

The Class News is a Fragment that is displayed in the Main activity when the

user taps on News tab (3rd tab) or when user swipes to Third page in

ViewPager. You can customize this fragment's contents as per your need. It

just show a list of dummy news with dummy image for each news.

o Nested Class Summary

Nested Classes

Modifier and

Type Class and Description

private

class

News.NewsAdapter

The Class NewsAdapter is the adapter for list view used in this

fragment.

Field Detail o tList

private java.util.ArrayList<Data> tList

Page 12: Contentsmyappsdoc.myapptemplates.com.s3-us-west-2.amazonaws.com/... · 2014-08-26 · com.football.ui Class Live public class Live extends android.support.v4.app.Fragment implements

The news list.

Constructor Detail o News

public News()

Method Detail o onCreateView o public android.view.View onCreateView(android.view.LayoutInflater

inflater,

o android.view.ViewGroup container,

android.os.Bundle savedInstanceState)

Overrides:

onCreateView in class android.support.v4.app.Fragment

o setupView

private void setupView(android.view.View v)

Setup the view components for this fragment. You write your code for

initializing the views, setting the adapters, touch and click listeners etc.

Parameters:

v - the base view of fragment

o loadDummyData

private void loadDummyData()

Load dummy news data for displaying on the Listview. You need to

write your own code for loading real data like from Rss Feeds or from

Web-service or API and displaying them on ListView.

Page 13: Contentsmyappsdoc.myapptemplates.com.s3-us-west-2.amazonaws.com/... · 2014-08-26 · com.football.ui Class Live public class Live extends android.support.v4.app.Fragment implements

com.football

Class NewsDetail

public class NewsDetail

extends CustomActivity

The NewsDetail is launched when you taps on a particular news in the News

Tab. It just dummy news details. You need to write code for loading actual

details.

Constructor Detail o NewsDetail

public NewsDetail()

Method Detail o onCreate

protected void onCreate(android.os.Bundle savedInstanceState)

Overrides:

onCreate in class android.support.v4.app.FragmentActivity

o onCreateOptionsMenu

public boolean onCreateOptionsMenu(android.view.Menu menu)

Overrides:

onCreateOptionsMenu in class android.app.Activity

o onOptionsItemSelected

public boolean onOptionsItemSelected(android.view.MenuItem item)

Overrides:

onOptionsItemSelected in class CustomActivity

Page 14: Contentsmyappsdoc.myapptemplates.com.s3-us-west-2.amazonaws.com/... · 2014-08-26 · com.football.ui Class Live public class Live extends android.support.v4.app.Fragment implements

com.football.ui

Class Players

public class Players

extends android.support.v4.app.Fragment

The Class Live is a Fragment that is displayed in the Main activity when the

user taps on Players tab (1st tab) or when user swipes to First page in

ViewPager. You can customize this fragment's contents as per your need. It just

show a dummy list of players and an image for each player. It shows details for

selected player only.

Field Detail o pList

private java.util.ArrayList<Data> pList

The players list.

Constructor Detail o Players

public Players()

Method Detail o onCreateView o public android.view.View onCreateView(android.view.LayoutInflater

inflater,

o android.view.ViewGroup container,

android.os.Bundle savedInstanceState)

Overrides:

onCreateView in class android.support.v4.app.Fragment

Page 15: Contentsmyappsdoc.myapptemplates.com.s3-us-west-2.amazonaws.com/... · 2014-08-26 · com.football.ui Class Live public class Live extends android.support.v4.app.Fragment implements

o setupView

private void setupView(android.view.View v)

Setup the view components for this fragment. You write your code for

initializing the views, setting the adapters, touch and click listeners etc.

Parameters:

v - the base view of fragment

o showSelectedPlayerInfo o private void showSelectedPlayerInfo(android.view.View v,

o Data d,

android.view.View player)

Show selected player info. it just show dummy information on screen

for selected player.

Parameters:

v - the root view

d - the player data

player - the player view

o loadDummyData

private void loadDummyData()

Load dummy players data for displaying on the Listview. You need to

write your own code for loading real data like from Web-service or API

and displaying them on ListView.

com.football

Page 16: Contentsmyappsdoc.myapptemplates.com.s3-us-west-2.amazonaws.com/... · 2014-08-26 · com.football.ui Class Live public class Live extends android.support.v4.app.Fragment implements

Class SplashScreen

public class SplashScreen

extends android.app.Activity

The Class SplashScreen will launched at the start of the application. It will be

displayed for 3 seconds and than finished automatically and it will also start the

next activity of app.

Field Detail o isRunning

private boolean isRunning

Check if the app is running.

Constructor Detail o SplashScreen

public SplashScreen()

Method Detail o onCreate

public void onCreate(android.os.Bundle savedInstanceState)

Overrides:

onCreate in class android.app.Activity

o startSplash

private void startSplash()

Starts the count down timer for 3-seconds. It simply sleeps the thread

for 3-seconds.

o doFinish

private void doFinish()

Page 17: Contentsmyappsdoc.myapptemplates.com.s3-us-west-2.amazonaws.com/... · 2014-08-26 · com.football.ui Class Live public class Live extends android.support.v4.app.Fragment implements

If the app is still running than this method will start the MainActivity

and finish the Splash.

o onKeyDown o public boolean onKeyDown(int keyCode,

android.view.KeyEvent event)

Specified by:

onKeyDown in interface android.view.KeyEvent.Callback

Overrides:

onKeyDown in class android.app.Activity

com.football

Class Stadium

public class Stadium

extends CustomActivity

The Activity Stadium is launched when you taps on Stadium name or on

Stadium screen in Live tab. It shows a few dummy stadium images in

horizontal list and taping on image will show details about selected stadium.

Field Detail o pList

private java.util.ArrayList<Data> pList

The stadium list.

Page 18: Contentsmyappsdoc.myapptemplates.com.s3-us-west-2.amazonaws.com/... · 2014-08-26 · com.football.ui Class Live public class Live extends android.support.v4.app.Fragment implements

Constructor Detail o Stadium

public Stadium()

Method Detail o onCreate

protected void onCreate(android.os.Bundle savedInstanceState)

Overrides:

onCreate in class android.support.v4.app.FragmentActivity

o setupView

private void setupView()

Setup the view components for this fragment. You write your code for

initializing the views, setting the adapters, touch and click listeners etc.

o showSelectedStadiumInfo o private void showSelectedStadiumInfo(Data d,

android.view.View std)

Show selected stadium info. it just show dummy information on screen

for selected stadium.

Parameters:

d - the stadium data

std - the stadium view

o loadDummyData

private void loadDummyData()

Load dummy data. You need to write your own loagic for loading the

actual contents like via web-services/API.

o onCreateOptionsMenu

public boolean onCreateOptionsMenu(android.view.Menu menu)

Overrides:

Page 19: Contentsmyappsdoc.myapptemplates.com.s3-us-west-2.amazonaws.com/... · 2014-08-26 · com.football.ui Class Live public class Live extends android.support.v4.app.Fragment implements

onCreateOptionsMenu in class android.app.Activity

o onOptionsItemSelected

public boolean onOptionsItemSelected(android.view.MenuItem item)

Overrides:

onOptionsItemSelected in class CustomActivity

com.football.ui

Class Table

public class Table

extends android.support.v4.app.Fragment

The Class Table is a Fragment that is displayed in the Main activity when the

user taps on Tables tab (4th tab) or when user swipes to Fourth page in

ViewPager. You can customize this fragment's contents as per your need. It

just show a list of dummy teams and points for each team.

o Nested Class Summary

Nested Classes

Modifier and

Type Class and Description

private Table.TableAdapter

Page 20: Contentsmyappsdoc.myapptemplates.com.s3-us-west-2.amazonaws.com/... · 2014-08-26 · com.football.ui Class Live public class Live extends android.support.v4.app.Fragment implements

class The Class TableAdapter is the adapter for list view used in this

fragment.

Field Detail o tList

private java.util.ArrayList<Data> tList

The team list.

Constructor Detail o Table

public Table()

Method Detail o onCreateView o public android.view.View onCreateView(android.view.LayoutInflater

inflater,

o android.view.ViewGroup container,

android.os.Bundle savedInstanceState)

Overrides:

onCreateView in class android.support.v4.app.Fragment

o setupView

private void setupView(android.view.View v)

Setup the view components for this fragment. You write your code for

initializing the views, setting the adapters, touch and click listeners etc.

Parameters:

v - the base view of fragment

o loadDummyData

private void loadDummyData()

Load dummy score data for displaying on the Listview. You need to

write your own code for loading real data like from Rss Feeds or from

Web-service or API and displaying them on ListView.

Page 21: Contentsmyappsdoc.myapptemplates.com.s3-us-west-2.amazonaws.com/... · 2014-08-26 · com.football.ui Class Live public class Live extends android.support.v4.app.Fragment implements

com.football.ui

Class Teams

public class Teams

extends android.support.v4.app.Fragment

The Class Teams is a Fragment that is displayed in the Main activity when the

user taps on Teams tab (2nd tab) or when user swipes to Second page in

ViewPager. You can customize this fragment's contents as per your need. It

just show a list of dummy dummy teams with dummy logo for each team.

Teams are shown for each upcoming tournaments which are also dummy.

o Nested Class Summary

Nested Classes

Modifier and

Type Class and Description

private

class

Teams.TeamAdapter

The Class TeamAdapter is the adapter for list view used in this

fragment.

Field Detail o tList

private java.util.ArrayList<Data> tList

Page 22: Contentsmyappsdoc.myapptemplates.com.s3-us-west-2.amazonaws.com/... · 2014-08-26 · com.football.ui Class Live public class Live extends android.support.v4.app.Fragment implements

The team list.

Constructor Detail o Teams

public Teams()

Method Detail o onCreateView o public android.view.View onCreateView(android.view.LayoutInflater

inflater,

o android.view.ViewGroup container,

android.os.Bundle savedInstanceState)

Overrides:

onCreateView in class android.support.v4.app.Fragment

o setupView

private void setupView(android.view.View v)

Setup the view components for this fragment. You write your code for

initializing the views, setting the adapters, touch and click listeners etc.

Parameters:

v - the base view of fragment

o loadDummyData

private void loadDummyData()

Load dummy tournaments data for displaying on the Listview. You need

to write your own code for loading real data like from Rss Feeds or from

Web-service or API and displaying them on ListView.

Page 23: Contentsmyappsdoc.myapptemplates.com.s3-us-west-2.amazonaws.com/... · 2014-08-26 · com.football.ui Class Live public class Live extends android.support.v4.app.Fragment implements

com.football.utils

Class TouchEffect

public class TouchEffect

extends java.lang.Object

implements android.view.View.OnTouchListener

The Class TouchEffect is a Base Touch listener. It can be attached as touch

listener for any view that as some valid background drawable or color. It

simply set alpha value for background to create a Touch like effect on View

Constructor Detail o TouchEffect

public TouchEffect()

Method Detail o onTouch o public boolean onTouch(android.view.View v,

android.view.MotionEvent event)

Specified by:

onTouch in interface android.view.View.OnTouchListener