|
| 1 | +/** |
| 2 | + * Copyright (C) 2010-2012 eBusiness Information, Excilys Group |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| 5 | + * use this file except in compliance with the License. You may obtain a copy of |
| 6 | + * the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed To in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 12 | + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 13 | + * License for the specific language governing permissions and limitations under |
| 14 | + * the License. |
| 15 | + */ |
| 16 | +package com.googlecode.androidannotations.test15; |
| 17 | + |
| 18 | +import android.app.Fragment; |
| 19 | +import android.content.Intent; |
| 20 | + |
| 21 | +import com.googlecode.androidannotations.annotations.EFragment; |
| 22 | +import com.googlecode.androidannotations.annotations.OnActivityResult; |
| 23 | + |
| 24 | +@EFragment(R.layout.views_injected) |
| 25 | +public class AwaitingResultFragment extends Fragment { |
| 26 | + |
| 27 | + private static final int FIRST_REQUEST = 11; |
| 28 | + private static final int SECOND_REQUEST = 22; |
| 29 | + private static final int THIRD_REQUEST = 33; |
| 30 | + |
| 31 | + @OnActivityResult(FIRST_REQUEST) |
| 32 | + void onResult() { |
| 33 | + } |
| 34 | + |
| 35 | + @OnActivityResult(SECOND_REQUEST) |
| 36 | + void onResultWithData(Intent intentData) { |
| 37 | + } |
| 38 | + |
| 39 | + @OnActivityResult(SECOND_REQUEST) |
| 40 | + void onActivityResultWithResultCodeAndData(int result, Intent intentData) { |
| 41 | + } |
| 42 | + |
| 43 | + @OnActivityResult(SECOND_REQUEST) |
| 44 | + void onActivityResultWithDataAndResultCode(Intent intentData, int result) { |
| 45 | + } |
| 46 | + |
| 47 | + @OnActivityResult(THIRD_REQUEST) |
| 48 | + void onResultWithIntResultCode(int resultCode) { |
| 49 | + } |
| 50 | + |
| 51 | + @OnActivityResult(THIRD_REQUEST) |
| 52 | + void onResultWithIntegerResultCode(Integer resultCodeInteger) { |
| 53 | + } |
| 54 | + |
| 55 | +} |
0 commit comments