ITeye博客

My_blog

huanxiang0220 · 共 72 篇文章

CoordinatorLayout 使用

CollapsingToolbarLayout: <!-- app:layout_collapseMode="pin" 固定 app:layout_collapseMode="parallax" //视差效果 不设置,跟随滑动 -->

2017-04-18 15:51 · Andriod · 评论(0)

抽屉菜单沉浸式状态

1、 <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimary</item> <item name="colorAccent">@color/colorAccent</item> <item name="windowActionBar">f…

2016-10-11 15:40 · Andriod · 评论(0)

html5编辑器

怎么让Eclipse Adt支持HTML5新增的标签 http://bbs.phonegap100.com/thread-385-1-1.html (出处: PhoneGap中文网) 插件:http://download.aptana.com/studio3/plugin/install

2016-09-26 12:31 · Andriod · 评论(0)

23种设计模式

1、工厂设计模式: 凡是出现了大量的产品需要创建,并且具有共同的接口时,可以通过工厂方法模式进行创建。 共同的代码: public interface Sender { void send(); } public class MailSender implements Sender { @Override public void send() { System.out.println("MailSender发送send方法"); } } public class SmsSender implements Sender { @Override public void send() { Syst…

2016-08-23 23:57 · Java · 评论(0)

ScaleType

ScaleType图解

2016-07-07 17:56 · Andriod · 评论(0)

拨打电话

拨打电话; Intent intent = new Intent(Intent.ACTION_CALL,Uri.parse("tel:" + editText.getText())); startActivity(intent);

2016-06-23 18:34 · Andriod · 评论(0)

设置状态栏是否显示或者设置为透明的

全屏显示不透明: // getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN); 全屏显示并透明: getWindow().requestFeature(Window.FEATURE_NO_TITLE); if(VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { Window window = getWindow(); window.clearFlags(WindowManager.LayoutP…

2016-06-07 11:45 · Andriod · 评论(0)

http://blog.csdn.net/h7870181/article/details/8332991

显示软键盘

2016-05-04 09:45 · Andriod · 评论(0)

代码设置大小

代码设置大小: Resources r = getResources(); mUnderlineHeight = (int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 2, r.getDisplayMetrics());

2016-04-27 15:47 · Andriod · 评论(0)

软键盘的操作

关闭软键盘:(hideSoftKeyboard) void hideSoftKeyboard() { if(getWindow().getAttributes().softInputMode != WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN){ if(getCurrentFocus() != null){ inputMethodManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); …

2016-04-22 17:22 · Andriod · 软键盘的操作 · 评论(0)

百度地图开发中的主要知识点

<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:map="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <LinearLayout android:layout_…

2016-02-23 10:51 · Andriod · 评论(0)

测量ScrollView的相关高度(监听滑动到顶端和底部)

private void init() { mScrollView = (ScrollView) findViewById(R.id.scrollview); mScrollView.setOnTouchListener(new TouchListenerImpl()); } class TouchListenerImpl implements OnTouchListener { @Override public boolean onTouch(View v, MotionEvent event) { switch (event.getAction()) { case MotionEvent…

2016-01-03 15:00 · Andriod · 评论(0)

Splash的作用

1:展示产品logo 2:初始化数据库、工作控件 3:检查应用程序的版本更新 4:校验应用程序的合法性

2015-12-19 21:36 · Andriod · 评论(0)

自定义土司的集中方式

Toast taToast = Toast.makeText(MainActivity.this, null, Toast.LENGTH_SHORT); taToast.setGravity(Gravity.CENTER, 180, 0);中心向右180px taToast.setText("我是自定义土司"); taToast.setDuration(Toast.LENGTH_SHORT); taToast.show(); Toast taToast = new Toast(MainActivity.this); taToast.setDuration(Toast.LENGTH_SHORT…

2015-11-26 19:44 · Andriod · 评论(0)

隐藏软键盘的方式

1、activity中,getWin(.....) 2、清单文件中在该activity中android:windowSoftInputMode="stateHidden"

2015-11-26 11:43 · Andriod · 评论(0)