摘要: package com.pingyijinren.helloworld; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widg... 阅读全文
posted @ 2016-06-01 18:40 zqxLonely 阅读(203) 评论(0) 推荐(0) 编辑
摘要: Toast toast=new Toast(MainActivity.this); toast.setView(getLayoutInflater().inflate(R.layout.toast,null)); toast.show(); 阅读全文
posted @ 2016-06-01 18:15 zqxLonely 阅读(127) 评论(0) 推荐(0) 编辑
摘要: editText.addTextChangedListener(new TextWatcher() { @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { } @Over... 阅读全文
posted @ 2016-06-01 17:34 zqxLonely 阅读(333) 评论(0) 推荐(0) 编辑
摘要: 关键在于指定activity的action属性 然后直接通过action的值跳转 阅读全文
posted @ 2016-06-01 15:36 zqxLonely 阅读(436) 评论(0) 推荐(0) 编辑
摘要: package com.pingyijinren.helloworld; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.text.method.HideReturnsTransformationMethod; imp... 阅读全文
posted @ 2016-06-01 14:59 zqxLonely 阅读(1065) 评论(0) 推荐(0) 编辑
摘要: public class MainActivity extends AppCompatActivity { ProgressDialog progressDialog=null; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstan... 阅读全文
posted @ 2016-06-01 12:34 zqxLonely 阅读(127) 评论(0) 推荐(0) 编辑
摘要: @Override public boolean onCreateOptionsMenu(Menu menu) { menu.add(0,0,0,"关于"); menu.add(0,1,1,"退出"); return super.onCreateOptionsMenu(menu); } @Override publ... 阅读全文
posted @ 2016-06-01 12:25 zqxLonely 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 在/src/main/下创建assets文件夹,在assets文件夹下创建fonts文件夹,并把ttf文件放入fonts文件夹中 阅读全文
posted @ 2016-06-01 11:36 zqxLonely 阅读(338) 评论(0) 推荐(0) 编辑
摘要: AlertDialog.Builder builder=new AlertDialog.Builder(MainActivity.this); builder.setIcon(R.mipmap.ic_launcher); builder.setTitle("选择一个"); data=new Stri... 阅读全文
posted @ 2016-06-01 11:18 zqxLonely 阅读(124) 评论(0) 推荐(0) 编辑
摘要: public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layo... 阅读全文
posted @ 2016-06-01 11:03 zqxLonely 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-06-01 10:23 zqxLonely 阅读(328) 评论(0) 推荐(0) 编辑
摘要: DisplayMetrics displayMetrics=new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(displayMetrics); Log.d("MainActivity",displayMetrics.widthPixels+" "+displayMetri... 阅读全文
posted @ 2016-06-01 10:14 zqxLonely 阅读(186) 评论(0) 推荐(0) 编辑
摘要: getResources().getColor(R.color.colorAccent) 阅读全文
posted @ 2016-06-01 10:09 zqxLonely 阅读(161) 评论(0) 推荐(0) 编辑