Back to project page android_device.
The source code is released under:
[Apache License](http://www.apache.org/licenses/): Version 2.0, January 2004 =============== ## TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION ## ### 1. Definitions. ### "License" sha...
If you think the Android project android_device listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/* * ================================================================================================= * Copyright (C) 2013 - 2014 Martin Albedinsky [Wolf-ITechnologies] * ================================================================================================= * Licensed under the Apache License, Version 2.0 or later (further "License" only). * ------------------------------------------------------------------------------------------------- * You may use this file only in compliance with the License. More details and copy of this License * you may obtain at//from w ww. ja v a 2s. c o m * * http://www.apache.org/licenses/LICENSE-2.0 * * You can redistribute, modify or publish any part of the code written within this file but as it * is described in the License, the software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES or CONDITIONS OF ANY KIND. * * See the License for the specific language governing permissions and limitations under the License. * ================================================================================================= */ package com.wit.android.device.examples; import android.content.res.Resources; import com.wit.android.device.examples.fragment.FragmentsFactory; import com.wit.android.examples.ExBaseHomeActivity; import com.wit.android.examples.libs.fragment.manage.ExFragmentController; import com.wit.android.examples.model.ExNavigationItem; import java.util.List; /** * Examples application's home activity. Shows the simple navigation and hosts the container layout * for fragments. * * @author Martin Albedinsky */ public class HomeActivity extends ExBaseHomeActivity { /** * Log TAG. */ // private static final String TAG = HomeActivity.class.getSimpleName(); /** */ @Override public void setNavigationVisible(boolean visible) { super.setNavigationVisible(visible); } /** */ @Override protected List<ExNavigationItem> onCreateNavigationItems(List<ExNavigationItem> list, Resources resources) { final ExNavigationItem.Builder builder = new ExNavigationItem.Builder(resources); /** * Android device ========================================================================== */ list.add(createItem( FragmentsFactory.DEVICE_INFO, R.string.Navigation_Label_DeviceInfo, builder )); /** * Screen wrapper ========================================================================== */ list.add(createItem( FragmentsFactory.SCREEN_INFO, R.string.Navigation_Label_ScreenInfo, builder )); list.add(createItem( FragmentsFactory.SCREEN_INTERFACE, R.string.Navigation_Label_ScreenInterface, builder )); /** * Connection wrapper ====================================================================== */ list.add(createItem( FragmentsFactory.NETWORK_CONNECTION_INFO, R.string.Navigation_Label_ConnectionInfo, builder )); /** * Battery wrapper ========================================================================= */ list.add(createItem( FragmentsFactory.BATTERY_INFO, R.string.Navigation_Label_BatteryInfo, builder )); /** * Storage wrapper ========================================================================= */ list.add(createItem( FragmentsFactory.STORAGE_INFO, R.string.Navigation_Label_StorageInfo, builder )); list.add(createItem( FragmentsFactory.STORAGE_INTERFACE, R.string.Navigation_Label_StorageInterface, builder )); return list; } /** */ @Override protected void onAttachFragmentFactory(ExFragmentController controller) { controller.setFragmentFactory(new FragmentsFactory()); } }