Compare commits
No commits in common. 'main' and 'mipanpan_branch' have entirely different histories.
main
...
mipanpan_b
@ -1,5 +0,0 @@
|
|||||||
# 默认忽略的文件
|
|
||||||
/shelf/
|
|
||||||
/workspace.xml
|
|
||||||
.idea
|
|
||||||
*.iml
|
|
@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_19" default="true" project-jdk-name="openjdk-19" project-jdk-type="JavaSDK">
|
|
||||||
<output url="file://$PROJECT_DIR$/out" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ProjectModuleManager">
|
|
||||||
<modules>
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/helloword.iml" filepath="$PROJECT_DIR$/helloword.iml" />
|
|
||||||
</modules>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="VcsDirectoryMappings">
|
|
||||||
<mapping directory="" vcs="Git" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@ -1 +0,0 @@
|
|||||||
123
|
|
Binary file not shown.
@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<module type="JAVA_MODULE" version="4">
|
|
||||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
||||||
<exclude-output />
|
|
||||||
<content url="file://$MODULE_DIR$">
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" packagePrefix="net.micode.notes.ui" />
|
|
||||||
</content>
|
|
||||||
<orderEntry type="inheritedJdk" />
|
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
|
||||||
</component>
|
|
||||||
</module>
|
|
@ -1,4 +1,2 @@
|
|||||||
3211.
|
3211.
|
||||||
在main中修改文件
|
在mipanpan分支下添加的内容
|
||||||
在mipanpan分支下添加的内容
|
|
||||||
|
|
@ -1,90 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2010-2011, The MiCode Open Source Community (www.micode.net)
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package net.micode.notes.ui;
|
|
||||||
|
|
||||||
import java.util.Calendar;
|
|
||||||
|
|
||||||
import net.micode.notes.R;
|
|
||||||
import net.micode.notes.ui.DateTimePicker;
|
|
||||||
import net.micode.notes.ui.DateTimePicker.OnDateTimeChangedListener;
|
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.content.DialogInterface.OnClickListener;
|
|
||||||
import android.text.format.DateFormat;
|
|
||||||
import android.text.format.DateUtils;
|
|
||||||
|
|
||||||
public class DateTimePickerDialog extends AlertDialog implements OnClickListener {
|
|
||||||
|
|
||||||
private Calendar mDate = Calendar.getInstance();
|
|
||||||
private boolean mIs24HourView;
|
|
||||||
private OnDateTimeSetListener mOnDateTimeSetListener;
|
|
||||||
private DateTimePicker mDateTimePicker;
|
|
||||||
|
|
||||||
public interface OnDateTimeSetListener {
|
|
||||||
void OnDateTimeSet(AlertDialog dialog, long date);
|
|
||||||
}
|
|
||||||
|
|
||||||
public DateTimePickerDialog(Context context, long date) {
|
|
||||||
super(context);
|
|
||||||
mDateTimePicker = new DateTimePicker(context);
|
|
||||||
setView(mDateTimePicker);
|
|
||||||
mDateTimePicker.setOnDateTimeChangedListener(new OnDateTimeChangedListener() {
|
|
||||||
public void onDateTimeChanged(DateTimePicker view, int year, int month,
|
|
||||||
int dayOfMonth, int hourOfDay, int minute) {
|
|
||||||
mDate.set(Calendar.YEAR, year);
|
|
||||||
mDate.set(Calendar.MONTH, month);
|
|
||||||
mDate.set(Calendar.DAY_OF_MONTH, dayOfMonth);
|
|
||||||
mDate.set(Calendar.HOUR_OF_DAY, hourOfDay);
|
|
||||||
mDate.set(Calendar.MINUTE, minute);
|
|
||||||
updateTitle(mDate.getTimeInMillis());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
mDate.setTimeInMillis(date);
|
|
||||||
mDate.set(Calendar.SECOND, 0);
|
|
||||||
mDateTimePicker.setCurrentDate(mDate.getTimeInMillis());
|
|
||||||
setButton(context.getString(R.string.datetime_dialog_ok), this);
|
|
||||||
setButton2(context.getString(R.string.datetime_dialog_cancel), (OnClickListener)null);
|
|
||||||
set24HourView(DateFormat.is24HourFormat(this.getContext()));
|
|
||||||
updateTitle(mDate.getTimeInMillis());
|
|
||||||
}
|
|
||||||
|
|
||||||
public void set24HourView(boolean is24HourView) {
|
|
||||||
mIs24HourView = is24HourView;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOnDateTimeSetListener(OnDateTimeSetListener callBack) {
|
|
||||||
mOnDateTimeSetListener = callBack;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void updateTitle(long date) {
|
|
||||||
int flag =
|
|
||||||
DateUtils.FORMAT_SHOW_YEAR |
|
|
||||||
DateUtils.FORMAT_SHOW_DATE |
|
|
||||||
DateUtils.FORMAT_SHOW_TIME;
|
|
||||||
flag |= mIs24HourView ? DateUtils.FORMAT_24HOUR : DateUtils.FORMAT_24HOUR;
|
|
||||||
setTitle(DateUtils.formatDateTime(this.getContext(), date, flag));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void onClick(DialogInterface arg0, int arg1) {
|
|
||||||
if (mOnDateTimeSetListener != null) {
|
|
||||||
mOnDateTimeSetListener.OnDateTimeSet(this, mDate.getTimeInMillis());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
package net.micode.notes.ui;
|
|
||||||
|
|
||||||
public class java {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
System.out.println("我爱你");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
|||||||
package net.micode.notes.ui;
|
|
||||||
|
|
||||||
public class text {
|
|
||||||
}
|
|
Loading…
Reference in new issue