Android 菜单框架 Cangol-UIFrame

码农软件 · 软件分类 · 手机开发包 · 2019-05-04 21:26:45

软件介绍

Cangol-UIFrame 是一款App UI 框架,用于Android应用。

示例代码:

package mobi.cangol.mobile.uiframe.demo;    
import mobi.cangol.mobile.base.BaseActionBarActivity;    
import mobi.cangol.mobile.navigation.TabNavigationFragmentActivity;    
import mobi.cangol.mobile.uiframe.demo.fragment.HomeFragment;    
import mobi.cangol.mobile.logging.Log;    
import mobi.cangol.mobile.uiframe.demo.fragment.MenuFragment;    
import mobi.cangol.mobile.uiframe.demo.fragment.MenuFragment2;    
import android.annotation.SuppressLint;    
import android.os.Bundle;    
@SuppressLint("ResourceAsColor")    
public class MainActivity extends TabNavigationFragmentActivity {    
	private static long back_pressed;    
	@Override    
	public void onCreate(Bundle savedInstanceState) {    
		super.onCreate(savedInstanceState);    
		this.setStatusBarTintColor(R.color.red);    
		this.setNavigationBarTintColor(R.color.black);    
		setContentView(R.layout.activity_main);    
		this.getCustomActionBar().setBackgroundResource(R.color.red);    
		if (savedInstanceState == null) {    
			this.setMenuFragment(MenuFragment.class,null);    
			this.setContentFragment(HomeFragment.class, "HomeFragment", null);    
		}    
		findViews();    
		initViews(savedInstanceState);    
		initData(savedInstanceState);    
		//this.setFloatActionBarEnabled(true);    
this.initFragmentStack(R.id.content_frame);    
if(savedInstanceState==null)    
this.replaceFragment(HomeFragment.class, "Home", null);    
	}    
	@Override    
	protected void onStart() {    
		super.onStart();    
		Log.v("onStart " + System.currentTimeMillis());    
	}    
	@Override    
	public void findViews() {    
	}    
	@Override    
	public void initViews(Bundle savedInstanceState) {    
	}    
	@Override    
	public void initData(Bundle savedInstanceState) {    
	}    
	@Override    
	public void onBack() {    
		if(back_pressed+2000>System.currentTimeMillis()){    
			super.onBack();    
			app.exit();    
		}else{    
			back_pressed=System.currentTimeMillis();    
showToast("Please on back");    
		}    
	}    
	public int getContentFrameId() {    
		return R.id.content_frame;    
	}    
}

本文地址:https://www.codercto.com/soft/d/5034.html

JavaScript

JavaScript

David Flanagan / O'Reilly Media / 2011-5-13 / GBP 39.99

The book is a programmer's guide and comprehensive reference to the core JavaScript language and to the client-side JavaScript APIs defined by web browsers. The sixth edition covers HTML 5 and ECMA......一起来看看 《JavaScript》 这本书的介绍吧!

SHA 加密
SHA 加密

SHA 加密工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具