1a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio/* 2a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio * Copyright (C) 2011 The Android Open Source Project 3a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio * 4a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio * Licensed under the Apache License, Version 2.0 (the "License"); 5a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio * you may not use this file except in compliance with the License. 6a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio * You may obtain a copy of the License at 7a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio * 8a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio * http://www.apache.org/licenses/LICENSE-2.0 9a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio * 10a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio * Unless required by applicable law or agreed to in writing, software 11a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio * distributed under the License is distributed on an "AS IS" BASIS, 12a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio * See the License for the specific language governing permissions and 14a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio * limitations under the License. 15a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio */ 16a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio 17a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Megliopackage com.android.bidi; 18a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio 19a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglioimport android.app.Fragment; 20a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglioimport android.os.Bundle; 21a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglioimport android.view.LayoutInflater; 22a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglioimport android.view.View; 23a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglioimport android.view.ViewGroup; 24a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglioimport android.widget.TextView; 25a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio 26a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Megliopublic class BiDiTestTextViewDrawablesRtl extends Fragment { 27a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio 28a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio private View currentView; 29a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio private TextView textViewError; 30a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio 31a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio @Override 32a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio public View onCreateView(LayoutInflater inflater, ViewGroup container, 33a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio Bundle savedInstanceState) { 34a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio currentView = inflater.inflate(R.layout.textview_drawables_rtl, container, false); 35a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio return currentView; 36a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio } 37a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio 38a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio @Override 39a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio public void onViewCreated(View view, Bundle savedInstanceState) { 40a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio super.onViewCreated(view, savedInstanceState); 41a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio 42a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio textViewError = (TextView) currentView.findViewById(R.id.textview_error); 43a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio textViewError.setError("Error!!"); 44a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio } 45a3b6b95f9943b53d25d44a35082f817802d4eccdFabrice Di Meglio} 46