2 * Copyright (C) 2007 The Android Open Source Project
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package android.widget.layout.linear;
19 import com.android.frameworks.coretests.R;
21 import android.app.Activity;
22 import android.os.Bundle;
23 import android.view.View;
25 public class LLOfTwoFocusableInTouchMode extends Activity {
27 private View mButton1;
28 private View mButton2;
29 private View mButton3;
31 private boolean mB1Fired = false;
32 private boolean mB2Fired = false;
33 private boolean mB3Fired = false;
36 protected void onCreate(Bundle savedInstanceState) {
37 super.onCreate(savedInstanceState);
39 setContentView(R.layout.linear_layout_buttons);
41 mButton1 = findViewById(R.id.button1);
42 mButton2 = findViewById(R.id.button2);
43 mButton3 = findViewById(R.id.button3);
45 mButton1.setFocusableInTouchMode(true);
46 mButton2.setFocusableInTouchMode(true);
47 mButton3.setFocusableInTouchMode(true);
49 mButton1.setOnClickListener(new View.OnClickListener() {
50 public void onClick(View v) {
55 mButton2.setOnClickListener(new View.OnClickListener() {
56 public void onClick(View v) {
61 mButton3.setOnClickListener(new View.OnClickListener() {
62 public void onClick(View v) {
68 public View getButton1() {
72 public View getButton2() {
76 public View getButton3() {
80 public boolean isB1Fired() {
84 public boolean isB2Fired() {
88 public boolean isB3Fired() {