当前位置: 首页>>代码示例>>Java>>正文


Java SlidingFragmentActivity类代码示例

本文整理汇总了Java中com.slidingmenu.lib.app.SlidingFragmentActivity的典型用法代码示例。如果您正苦于以下问题:Java SlidingFragmentActivity类的具体用法?Java SlidingFragmentActivity怎么用?Java SlidingFragmentActivity使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SlidingFragmentActivity类属于com.slidingmenu.lib.app包,在下文中一共展示了SlidingFragmentActivity类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreateView

import com.slidingmenu.lib.app.SlidingFragmentActivity; //导入依赖的package包/类
@Override
   public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
	super.onCreateView(inflater, container, savedInstanceState);
	SlidingFragmentActivity context = (SlidingFragmentActivity)this.getActivity();
	thisView = inflater.inflate(R.layout.fragment_maintenance, container, false);
	storingen = this.getArguments().getBoolean("storingen", false);
	
	CardUI mCardView = (CardUI) thisView.findViewById(R.id.content_container);
	CardStack title = new CardStack();
	if(storingen) {
		context.getSupportActionBar().setTitle("Storingen");
		title.setTitle("Storingen");
	} else {
		context.getSupportActionBar().setTitle("Werkzaamheden");
		title.setTitle("Werkzaamheden");
	}

       new NSTask(this).execute(NSTask.TYPE_STORINGEN);

	title.setTitleTypeFace(Typeface.createFromAsset(context.getAssets(), "fonts/Roboto-CondensedItalic.ttf"));
	mCardView.addStack(title);
	mCardView.refresh();

	return thisView;
}
 
开发者ID:jariz,项目名称:Reisplanner,代码行数:26,代码来源:MaintenanceFragment.java

示例2: onResume

import com.slidingmenu.lib.app.SlidingFragmentActivity; //导入依赖的package包/类
@Override
public void onResume() {
	if(updated) {
		((SlidingFragmentActivity) getSherlockActivity()).getSlidingMenu().setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
	} else {
		((SlidingFragmentActivity) getSherlockActivity()).getSlidingMenu().setTouchModeAbove(SlidingMenu.TOUCHMODE_NONE);
	}
	super.onResume();
}
 
开发者ID:Arasthel,项目名称:AlmeriBus,代码行数:10,代码来源:InicioFragment.java

示例3: onActivityCreated

import com.slidingmenu.lib.app.SlidingFragmentActivity; //导入依赖的package包/类
@Override
public void onActivityCreated(Bundle savedInstanceState) {
	getActivity().setTitle("Tarifas del servicio");
	((SlidingFragmentActivity) getSherlockActivity()).getSlidingMenu().setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
	nombresTarifas = new ArrayList<String>();
	preciosTarifas = new ArrayList<String>();
	listaTarifas = (ListView) getView().findViewById(R.id.lista_tarifas);
	listaTarifas.setEmptyView(getView().findViewById(R.id.empty_view));
	ListaTarifasAdapter adapter = new ListaTarifasAdapter(getActivity(), nombresTarifas, preciosTarifas);
	listaTarifas.setAdapter(adapter);
	new CargarTarifas().execute();
	super.onActivityCreated(savedInstanceState);
}
 
开发者ID:Arasthel,项目名称:AlmeriBus,代码行数:14,代码来源:TarifaFragment.java

示例4: onCreateView

import com.slidingmenu.lib.app.SlidingFragmentActivity; //导入依赖的package包/类
@Override
   public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
	super.onCreateView(inflater, container, savedInstanceState);
	thisView = inflater.inflate(R.layout.fragment_about, container, false);
	SlidingFragmentActivity context = (SlidingFragmentActivity)this.getActivity();
	context.getSupportActionBar().setTitle("Over");
	
	ListView software = (ListView)thisView.findViewById(R.id.software);
	software.setAdapter(new ArrayAdapter<String>(this.getActivity(), android.R.layout.simple_list_item_1, new String[] { "SlidingMenu", "Crouton", "CardsUI", "ActionbarSherlock", "RobotoTextView", "Android Action Bar Style Generator" }));
	
	return thisView;
}
 
开发者ID:jariz,项目名称:Reisplanner,代码行数:13,代码来源:AboutFragment.java

示例5: onCreateView

import com.slidingmenu.lib.app.SlidingFragmentActivity; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
		Bundle savedInstanceState) {
	updated = false;
	mReceiver = new BroadcastReceiver() {
		
		@Override
		public void onReceive(Context arg0, Intent intent) {
			if(intent.getAction().equals("org.arasthel.UPDATE_FINISHED")) {
				updated = true;
				View progress = getView().findViewById(R.id.progress);
				progress.setVisibility(View.GONE);
				TextView info = (TextView) getView().findViewById(R.id.info);
				info.setText("Datos cargados, por favor, dislice el dedo hacia la derecha o pulse \"Atrás\" para ir al menú principal.");
				View slide = getView().findViewById(R.id.slide);
				slide.setVisibility(View.VISIBLE);
				((SlidingFragmentActivity) getSherlockActivity()).getSlidingMenu().setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
				//((SlidingFragmentActivity) getSherlockActivity()).getSlidingMenu().setTouchModeBehind(SlidingMenu.TOUCHMODE_FULLSCREEN);
			} else if (intent.getAction().equals("org.arasthel.UPDATE_FAILED")) {
				View progress = getView().findViewById(R.id.progress);
				progress.setVisibility(View.GONE);
				TextView info = (TextView) getView().findViewById(R.id.info);
				info.setText("No se pudieron cargar los datos, revise su conexión a internet y vuelva a intentarlo. También puede intentar usar la aplicación, pero es probable que haya errores.");
				View slide = getView().findViewById(R.id.slide);
				slide.setVisibility(View.GONE);
				((SlidingFragmentActivity) getSherlockActivity()).getSlidingMenu().setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);
				Button retry = (Button) getView().findViewById(R.id.retry);
				retry.setVisibility(View.VISIBLE);
				retry.setOnClickListener(new OnClickListener() {
					
					@Override
					public void onClick(View arg0) {
						arg0.setVisibility(View.GONE);
						View progress = getView().findViewById(R.id.progress);
						progress.setVisibility(View.VISIBLE);
						((Principal) getActivity()).cargarParadas();
					}
				});
			}
			
		}
	};
	View v = inflater.inflate(R.layout.main, null);
	return v;
}
 
开发者ID:Arasthel,项目名称:AlmeriBus,代码行数:46,代码来源:InicioFragment.java


注:本文中的com.slidingmenu.lib.app.SlidingFragmentActivity类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。