Compare commits
43 Commits
lhb_branch
...
master
Author | SHA1 | Date |
---|---|---|
|
206d71c97b | 2 years ago |
|
ad5691cbb5 | 2 years ago |
|
73d04d5551 | 2 years ago |
|
2fe613466e | 2 years ago |
|
92000a5562 | 2 years ago |
|
9d2fa5f79e | 2 years ago |
|
0a0d8c697f | 2 years ago |
|
b46fb097e5 | 2 years ago |
|
9dcf8a8922 | 2 years ago |
|
da6f97d18f | 2 years ago |
|
cde4787e2c | 2 years ago |
|
15f302691e | 2 years ago |
|
c8984b063e | 2 years ago |
|
ad89053a14 | 2 years ago |
|
e1c50dc0d9 | 2 years ago |
|
900c930035 | 2 years ago |
|
3b628e3b07 | 2 years ago |
|
8ea3fb01af | 2 years ago |
|
860ecffad9 | 2 years ago |
|
2fe9dbb35e | 2 years ago |
|
38f82e9c6d | 2 years ago |
|
7dc654a1ca | 2 years ago |
|
d19be02f63 | 2 years ago |
|
fb01356bdf | 2 years ago |
|
b9cd21a75d | 2 years ago |
|
45b560eede | 2 years ago |
|
9b8b0f7073 | 2 years ago |
|
56062e0ead | 2 years ago |
|
dbf348be82 | 2 years ago |
|
71408d1786 | 2 years ago |
|
4345e40962 | 2 years ago |
|
9193cf373a | 2 years ago |
|
d89a6aaf12 | 2 years ago |
|
a673e93730 | 2 years ago |
|
703234af3e | 2 years ago |
|
1ddcdb3d17 | 2 years ago |
|
8ff6e2b866 | 2 years ago |
|
48590dfe30 | 2 years ago |
|
77aa9b13f3 | 2 years ago |
|
c9f2300019 | 2 years ago |
|
9eb3ff2761 | 2 years ago |
|
af40a5d0d0 | 2 years ago |
|
bea2cb4b1e | 2 years ago |
@ -1,19 +0,0 @@
|
||||
package net.micode.notes.ui;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
//以上是引入依赖
|
||||
public class AlarmReceiver extends BroadcastReceiver {
|
||||
//这是一个主类
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
intent.setClass(context, AlarmAlertActivity.class);
|
||||
//用来启动AlarmAlertActivity
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
//activity要存在于activity的栈中
|
||||
//所以要新起一个栈装入启动的activity
|
||||
context.startActivity(intent);
|
||||
}
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
package net.micode.notes.ui;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.widget.Button;
|
||||
import android.widget.PopupMenu;
|
||||
import android.widget.PopupMenu.OnMenuItemClickListener;
|
||||
|
||||
import net.micode.notes.R;
|
||||
|
||||
public class DropdownMenu {
|
||||
private Button mButton;
|
||||
private PopupMenu mPopupMenu;
|
||||
//声明一个下拉菜单
|
||||
private Menu mMenu;
|
||||
|
||||
public DropdownMenu(Context context, Button button, int menuId) {
|
||||
mButton = button;
|
||||
mButton.setBackgroundResource(R.drawable.dropdown_icon);
|
||||
//设置这个view的背景
|
||||
mPopupMenu = new PopupMenu(context, mButton);
|
||||
mMenu = mPopupMenu.getMenu();
|
||||
mPopupMenu.getMenuInflater().inflate(menuId, mMenu);
|
||||
//MenuInflater是用来实例化Menu目录下的Menu布局文件
|
||||
//根据ID来确认menu的内容选项
|
||||
mButton.setOnClickListener(new OnClickListener() {
|
||||
public void onClick(View v) {
|
||||
mPopupMenu.show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void setOnDropdownMenuItemClickListener(OnMenuItemClickListener listener) {
|
||||
if (mPopupMenu != null) {
|
||||
mPopupMenu.setOnMenuItemClickListener(listener);
|
||||
}//设置菜单的监听
|
||||
}
|
||||
|
||||
public MenuItem findItem(int id) {
|
||||
return mMenu.findItem(id);
|
||||
}//对于菜单选项的初始化,根据索引搜索菜单需要的选项
|
||||
|
||||
public void setTitle(CharSequence title) {
|
||||
mButton.setText(title);
|
||||
}//布局文件,设置标题
|
||||
}
|
After Width: | Height: | Size: 110 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 64 KiB |
After Width: | Height: | Size: 93 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 77 KiB |
After Width: | Height: | Size: 124 KiB |
After Width: | Height: | Size: 145 KiB |
After Width: | Height: | Size: 282 KiB |
After Width: | Height: | Size: 246 KiB |
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 71 KiB |
After Width: | Height: | Size: 174 KiB |
After Width: | Height: | Size: 73 KiB |
After Width: | Height: | Size: 98 KiB |
@ -0,0 +1 @@
|
||||
2
|
@ -0,0 +1 @@
|
||||
4
|
@ -0,0 +1 @@
|
||||
3
|