EMMA Coverage Report (generated Tue Jun 26 14:54:12 CEST 2012)
[all classes][org.tomdroid.ui]

COVERAGE SUMMARY FOR SOURCE FILE [Actionbar.java]

nameclass, %method, %block, %line, %
Actionbar.java100% (3/3)56%  (5/9)75%  (54/72)60%  (12/20)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class Actionbar$2100% (1/1)50%  (1/2)55%  (6/11)33%  (1/3)
onClick (View): void 0%   (0/1)0%   (0/5)0%   (0/2)
Actionbar$2 (Actionbar): void 100% (1/1)100% (6/6)100% (1/1)
     
class Actionbar$1100% (1/1)50%  (1/2)67%  (6/9)33%  (1/3)
onClick (View): void 0%   (0/1)0%   (0/3)0%   (0/2)
Actionbar$1 (Actionbar): void 100% (1/1)100% (6/6)100% (1/1)
     
class Actionbar100% (1/1)60%  (3/5)81%  (42/52)75%  (12/16)
Actionbar (Context): void 0%   (0/1)0%   (0/4)0%   (0/2)
Actionbar (Context, AttributeSet, int): void 0%   (0/1)0%   (0/6)0%   (0/2)
Actionbar (Context, AttributeSet): void 100% (1/1)100% (5/5)100% (2/2)
onFinishInflate (): void 100% (1/1)100% (5/5)100% (3/3)
setupButtons (): void 100% (1/1)100% (32/32)100% (7/7)

1/*
2 * Tomdroid
3 * Tomboy on Android
4 * http://www.launchpad.net/tomdroid
5 * 
6 * Copyright 2011 Stefan Hammer <j.4@gmx.at>
7 * Copyright 2010, Rodja Trappe <mail@rodja.net>
8 * 
9 * This file is part of Tomdroid.
10 * 
11 * Tomdroid is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation, either version 3 of the License, or
14 * (at your option) any later version.
15 * 
16 * Tomdroid is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 * GNU General Public License for more details.
20 * 
21 * You should have received a copy of the GNU General Public License
22 * along with Tomdroid.  If not, see <http://www.gnu.org/licenses/>.
23 */
24package org.tomdroid.ui;
25 
26import org.tomdroid.R;
27import org.tomdroid.sync.SyncManager;
28 
29import android.content.Context;
30import android.util.AttributeSet;
31import android.view.View;
32import android.widget.ImageView;
33import android.widget.RelativeLayout;
34 
35public class Actionbar extends RelativeLayout {
36 
37        public static final int DEFAULT_ICON_ALPHA = 200;
38 
39        public Actionbar(Context context, AttributeSet attrs) {
40                super(context, attrs);
41        }
42 
43        public Actionbar(Context context, AttributeSet attrs, int defStyle) {
44                super(context, attrs, defStyle);
45        }
46 
47        public Actionbar(Context context) {
48                super(context);
49        }
50 
51        @Override
52        public void onFinishInflate(){
53                super.onFinishInflate();
54                setupButtons();
55        }
56        
57        private void setupButtons(){
58                
59                final ImageView syncButton = (ImageView) findViewById(R.id.sync);
60                final ImageView syncIcon = (ImageView) findViewById(R.id.syncIcon);
61                syncIcon.getDrawable().setAlpha(Actionbar.DEFAULT_ICON_ALPHA);
62                syncButton.setOnClickListener(new View.OnClickListener() {
63 
64                        public void onClick(View v) {
65                                SyncManager.getInstance().startSynchronization();
66                        }
67                });
68                
69                final ImageView TomdroidIcon = (ImageView) findViewById(R.id.action_icon);
70                TomdroidIcon.setOnClickListener(new View.OnClickListener() {
71 
72                        public void onClick(View v) {
73                                Tomdroid.ViewList(getContext());
74                        }
75                });
76        }
77        
78}

[all classes][org.tomdroid.ui]
EMMA 0.0.0 (unsupported private build) (C) Vladimir Roubtsov