Compare commits
27 Commits
86d8f99995
...
ba8182c288
Author | SHA1 | Date |
---|---|---|
|
ba8182c288 | 2 years ago |
|
d701800cc5 | 2 years ago |
|
19619f1513 | 2 years ago |
|
89a4864540 | 2 years ago |
|
c08e583c3a | 2 years ago |
|
30ba5149c6 | 2 years ago |
|
c20ef7ad39 | 2 years ago |
|
f22c313e34 | 2 years ago |
|
cf6b7da8c9 | 2 years ago |
|
f46a8734e6 | 2 years ago |
|
a2a9268eaf | 2 years ago |
|
4ff1a6455c | 2 years ago |
|
fd96fdaa94 | 2 years ago |
|
395086d977 | 2 years ago |
|
d64427cbb9 | 2 years ago |
|
3bd0a81eaf | 2 years ago |
|
00ed1503cd | 2 years ago |
|
15aa6e7f52 | 2 years ago |
|
ccaacca331 | 2 years ago |
|
472102ea7f | 2 years ago |
|
2471e68e72 | 2 years ago |
|
9a6f6a450a | 2 years ago |
|
c28c03cd50 | 2 years ago |
|
f98b91d84d | 2 years ago |
|
038fa79824 | 2 years ago |
|
0f8d81fbb5 | 2 years ago |
|
7a3dbc43c0 | 2 years ago |
@ -0,0 +1,3 @@
|
||||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
@ -0,0 +1,5 @@
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="20" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/main.iml" filepath="$PROJECT_DIR$/main.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,6 @@
|
||||
projectKey=myNotes
|
||||
serverUrl=http://127.0.0.1:9000
|
||||
serverVersion=9.5.0.56709
|
||||
dashboardUrl=http://127.0.0.1:9000/dashboard?id=myNotes
|
||||
ceTaskId=AYRIh5EzuqDImpFV-sUP
|
||||
ceTaskUrl=http://127.0.0.1:9000/api/ce/task?id=AYRIh5EzuqDImpFV-sUP
|
@ -0,0 +1,15 @@
|
||||
package net.micode.notes.data;
|
||||
|
||||
public class WeatherBean {
|
||||
|
||||
public int code;
|
||||
public Result result;
|
||||
public class Result{
|
||||
public String province;
|
||||
public String area;
|
||||
public String real;
|
||||
public String weather;
|
||||
public String tips="";
|
||||
public String wind="";
|
||||
}
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package net.micode.notes.ui;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Toast;
|
||||
|
||||
import net.micode.notes.R;
|
||||
|
||||
public class ChangingPassword extends Activity {
|
||||
EditText OldPassword;
|
||||
EditText NewPassword;
|
||||
EditText AckPassword;
|
||||
Button Acknowledged;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_change_password);
|
||||
getWindow().setSoftInputMode(
|
||||
WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE
|
||||
| WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
|
||||
OldPassword=(EditText) findViewById(R.id.old_password);
|
||||
NewPassword=(EditText) findViewById(R.id.new_password);
|
||||
AckPassword=(EditText) findViewById(R.id.ack_password);
|
||||
Acknowledged=(Button)findViewById(R.id.Acknowledged);
|
||||
Acknowledged.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
String old_password = OldPassword.getText().toString();
|
||||
String new_password = NewPassword.getText().toString();
|
||||
String ack_password = AckPassword.getText().toString();
|
||||
SharedPreferences pref=getSharedPreferences("user management",MODE_PRIVATE);
|
||||
String login_password=pref.getString("password","");
|
||||
if(old_password.equals("")==true || new_password.equals("")==true || ack_password.equals("")==true) {
|
||||
Toast.makeText(ChangingPassword.this, "密码不能为空", Toast.LENGTH_SHORT).show();
|
||||
}else if (new_password.equals(ack_password) == false) {
|
||||
Toast.makeText(ChangingPassword.this, "新建密码与重复密码不匹配,请重新输入密码", Toast.LENGTH_SHORT).show();
|
||||
AckPassword.setText("");
|
||||
}else if(old_password.equals(login_password) == false){
|
||||
Toast.makeText(ChangingPassword.this, "原有密码错误,请重新输入密码", Toast.LENGTH_SHORT).show();
|
||||
OldPassword.setText("");
|
||||
}
|
||||
else if (new_password.equals(ack_password) == true && old_password.equals(login_password) == true){
|
||||
SharedPreferences.Editor editor=getSharedPreferences("user management", MODE_PRIVATE).edit();
|
||||
editor.putString("password",new_password);
|
||||
editor.apply();
|
||||
Toast.makeText(ChangingPassword.this, "修改密码成功", Toast.LENGTH_SHORT).show();
|
||||
Intent intent=new Intent(ChangingPassword.this,NotesListActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
Intent intent=new Intent(ChangingPassword.this,NotesListActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,63 @@
|
||||
package net.micode.notes.ui;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Toast;
|
||||
|
||||
import net.micode.notes.R;
|
||||
|
||||
public class DeletingPassword extends Activity {
|
||||
EditText Dt_password;
|
||||
Button Acknowledged;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_delete_password);
|
||||
getWindow().setSoftInputMode(
|
||||
WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE
|
||||
| WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
|
||||
Dt_password=(EditText) findViewById(R.id.thepassword);
|
||||
Acknowledged=(Button)findViewById(R.id.Dt_Acknowledged);
|
||||
Acknowledged.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
String text02 = Dt_password.getText().toString();
|
||||
if(text02.equals("")==true)
|
||||
Toast.makeText(DeletingPassword.this, "密码不能为空", Toast.LENGTH_SHORT).show();
|
||||
SharedPreferences pref=getSharedPreferences("user management",MODE_PRIVATE);
|
||||
String password = pref.getString("password","");
|
||||
if(password.equals("")==false&&password.equals(text02)==true){
|
||||
SharedPreferences.Editor editor=getSharedPreferences("user management",
|
||||
MODE_PRIVATE).edit();
|
||||
editor.putBoolean("user",false);//false表示已经设置登录密码
|
||||
editor.putString("password","");
|
||||
editor.apply();
|
||||
|
||||
Toast.makeText(DeletingPassword.this, "已经删除登录密码", Toast.LENGTH_SHORT).show();
|
||||
Intent intent=new Intent(DeletingPassword.this,NotesListActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
else{
|
||||
Toast.makeText(DeletingPassword.this, "密码错误", Toast.LENGTH_SHORT).show();
|
||||
Dt_password.setText("");//把密码框内输入过的错误密码清空
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
Intent intent=new Intent(DeletingPassword.this,NotesListActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,43 @@
|
||||
package net.micode.notes.ui;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.speech.tts.TextToSpeech;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.Toast;
|
||||
|
||||
import net.micode.notes.R;
|
||||
|
||||
|
||||
public class GetLocation extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
this.setContentView(R.layout.local);
|
||||
Toast.makeText(GetLocation.this,"init",Toast.LENGTH_SHORT).show();
|
||||
Button local_1 = new Button(this);
|
||||
Button local_2 = new Button(this);
|
||||
local_1.setOnClickListener(new View.OnClickListener() {
|
||||
private static final String TAG = "GetLocation";
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Log.i(TAG, "onClick: button1");
|
||||
Toast.makeText(GetLocation.this,"button1",Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
local_2.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Toast.makeText(GetLocation.this, "button2", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
package net.micode.notes.ui;
|
||||
|
||||
import static android.content.Context.MODE_PRIVATE;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Toast;
|
||||
|
||||
import net.micode.notes.R;
|
||||
|
||||
public class SettingPassword extends Activity {
|
||||
EditText password;
|
||||
EditText password_ack;
|
||||
Button acknowledge;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_set_loginpassword);
|
||||
getWindow().setSoftInputMode(
|
||||
WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE
|
||||
| WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
|
||||
password=(EditText) findViewById(R.id.password);
|
||||
password_ack=(EditText) findViewById(R.id.password_ack);
|
||||
acknowledge=(Button)findViewById(R.id.acknowledge);
|
||||
acknowledge.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
String text02 = password.getText().toString();
|
||||
String text03 = password_ack.getText().toString();
|
||||
if(text02.equals("")==true) {
|
||||
Toast.makeText(SettingPassword.this, "密码不能为空", Toast.LENGTH_SHORT).show();
|
||||
}else if (text02.equals(text03) == false) {
|
||||
Toast.makeText(SettingPassword.this, "密码不匹配,请重新输入密码", Toast.LENGTH_SHORT).show();
|
||||
password_ack.setText("");
|
||||
}else if (text02.equals(text03) == true){
|
||||
SharedPreferences.Editor editor=getSharedPreferences("user management",
|
||||
MODE_PRIVATE).edit();
|
||||
editor.putBoolean("user",true);//true表示已经设置登录密码
|
||||
editor.putString("password",text02);
|
||||
editor.apply();
|
||||
Log.d("RegisterLoginPassword","password is "+text02);
|
||||
Toast.makeText(SettingPassword.this, "设置密码成功", Toast.LENGTH_SHORT).show();
|
||||
Intent intent=new Intent(SettingPassword.this,NotesListActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
Intent intent=new Intent(SettingPassword.this,NotesListActivity.class);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
package net.micode.notes.ui;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.os.Message;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import net.micode.notes.R;
|
||||
import net.micode.notes.data.WeatherBean;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
import okhttp3.Call;
|
||||
import okhttp3.Callback;
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.Request;
|
||||
import okhttp3.Response;
|
||||
|
||||
public class WeatherActivity extends Activity {
|
||||
EditText et_search;
|
||||
TextView tv_search,city,weather;
|
||||
String content;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_weather);
|
||||
et_search = (EditText) findViewById(R.id.et_search);
|
||||
tv_search = (TextView) findViewById(R.id.tv_search);
|
||||
weather = (TextView) findViewById(R.id.weather);
|
||||
city = (TextView) findViewById(R.id.content);
|
||||
tv_search.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
content = et_search.getText().toString();
|
||||
request();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
private void request() {
|
||||
|
||||
|
||||
//通过okhttp访问servlet
|
||||
String strURL = "https://apis.tianapi.com/tianqi/index?key=46b609e64712e310beaabd3901fce265&city=101020100&city="+content+"&type=1";
|
||||
|
||||
|
||||
Request request = new Request.Builder()
|
||||
.url(strURL)
|
||||
|
||||
.build();
|
||||
|
||||
|
||||
OkHttpClient okHttpClient = new OkHttpClient();
|
||||
Call call = okHttpClient.newCall(request);
|
||||
|
||||
//接收相应,进入子线程
|
||||
call.enqueue(new Callback() {
|
||||
@Override
|
||||
public void onFailure(Call call, IOException e) {
|
||||
Message message = new Message();
|
||||
message.what = 2;
|
||||
message.obj = e.getMessage();
|
||||
//通过handler向主线程发生json数据
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResponse(Call call, Response response) throws IOException {
|
||||
String json = response.body().string();
|
||||
Log.d("weather","weather"+json);
|
||||
Gson gson = new Gson();
|
||||
Type type = new TypeToken<WeatherBean>(){}.getType();
|
||||
WeatherBean weatherObject = gson.fromJson(json, type);
|
||||
if (weatherObject.code == 200) {
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
city.setText("城市:"+weatherObject.result.area);
|
||||
weather.setText(weatherObject.result.weather+weatherObject.result.real);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package net.micode.notes.ui.translate_demo;
|
||||
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface BaiduTranslateService {
|
||||
@POST("translate")
|
||||
@FormUrlEncoded
|
||||
Call<RespondBean> translate(@Field("q") String q, @Field("from") String from, @Field("to") String to, @Field("appid") String appid, @Field("salt") String salt,
|
||||
@Field("sign") String sign);
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package net.micode.notes.ui.translate_demo;
|
||||
|
||||
import java.security.MessageDigest;
|
||||
|
||||
/**
|
||||
* 加密解密工具类(对字符串加密) MD5加密
|
||||
*/
|
||||
public class MD5Utils {
|
||||
|
||||
/**
|
||||
* MD5加密算法使用 对字符串加密
|
||||
*
|
||||
* @param info 参数为需要加密的String
|
||||
* @return 返回加密后的String
|
||||
*/
|
||||
public static String getMD5Code(String info) {
|
||||
try {
|
||||
MessageDigest md5 = MessageDigest.getInstance("MD5");
|
||||
md5.update(info.getBytes("utf-8"));//设置编码格式
|
||||
byte[] encryption = md5.digest();
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
for (int i = 0; i < encryption.length; i++) {
|
||||
if (Integer.toHexString(0xff & encryption[i]).length() == 1) {
|
||||
stringBuffer.append("0").append(Integer.toHexString(0xff & encryption[i]));
|
||||
} else {
|
||||
stringBuffer.append(Integer.toHexString(0xff & encryption[i]));
|
||||
}
|
||||
}
|
||||
return stringBuffer.toString();
|
||||
} catch (Exception e) {
|
||||
return "MD5加密异常";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
package net.micode.notes.ui.translate_demo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class RespondBean {
|
||||
|
||||
/**
|
||||
* from : zh
|
||||
* to : en
|
||||
* trans_result : [{"src":"你好","dst":"Hello"}]
|
||||
*/
|
||||
|
||||
private String from;
|
||||
private String to;
|
||||
private List<TransResultBean> trans_result;
|
||||
|
||||
public String getFrom() {
|
||||
return from;
|
||||
}
|
||||
|
||||
public void setFrom(String from) {
|
||||
this.from = from;
|
||||
}
|
||||
|
||||
public String getTo() {
|
||||
return to;
|
||||
}
|
||||
|
||||
public void setTo(String to) {
|
||||
this.to = to;
|
||||
}
|
||||
|
||||
public List<TransResultBean> getTrans_result() {
|
||||
return trans_result;
|
||||
}
|
||||
|
||||
public void setTrans_result(List<TransResultBean> trans_result) {
|
||||
this.trans_result = trans_result;
|
||||
}
|
||||
|
||||
public static class TransResultBean {
|
||||
/**
|
||||
* src : 你好
|
||||
* dst : Hello
|
||||
*/
|
||||
|
||||
private String src;
|
||||
private String dst;
|
||||
|
||||
public String getSrc() {
|
||||
return src;
|
||||
}
|
||||
|
||||
public void setSrc(String src) {
|
||||
this.src = src;
|
||||
}
|
||||
|
||||
public String getDst() {
|
||||
return dst;
|
||||
}
|
||||
|
||||
public void setDst(String dst) {
|
||||
this.dst = dst;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
<?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$/java" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 89 KiB |
After Width: | Height: | Size: 143 KiB |
After Width: | Height: | Size: 170 KiB |
After Width: | Height: | Size: 179 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 140 KiB |
After Width: | Height: | Size: 717 KiB |
After Width: | Height: | Size: 658 KiB |
After Width: | Height: | Size: 214 KiB |
@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="旧密码:"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/old_password"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:password="true"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="新密码:"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/new_password"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:password="true"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="确认密码:"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/ack_password"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:password="true"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center">
|
||||
|
||||
<Button
|
||||
android:id="@+id/Acknowledged"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="确认"/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<LinearLayout
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="输入密码:"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/thepassword"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:password="true"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center">
|
||||
|
||||
<Button
|
||||
android:id="@+id/Dt_Acknowledged"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="确认"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="密码:"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/lg_password"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:password="true"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center">
|
||||
<Button
|
||||
android:id="@+id/login"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="登录"/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="新建密码:"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/password"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:password="true"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="确认密码:"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/password_ack"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:password="true"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center">
|
||||
|
||||
<Button
|
||||
android:id="@+id/acknowledge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="确认"/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,62 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#0099cc"
|
||||
tools:context=".ui.SplashActivity">
|
||||
|
||||
<!-- The primary full-screen view. This can be replaced with whatever view
|
||||
is needed to present your content, e.g. VideoView, SurfaceView,
|
||||
TextureView, etc. -->
|
||||
<TextView
|
||||
android:id="@+id/fullscreen_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:keepScreenOn="true"
|
||||
android:text="@string/dummy_content"
|
||||
android:textColor="#33b5e5"
|
||||
android:textSize="50sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<!-- This FrameLayout insets its children based on system windows using
|
||||
android:fitsSystemWindows. -->
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/fullscreen_content_controls"
|
||||
style="?metaButtonBarStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|center_horizontal"
|
||||
android:background="@color/black_overlay"
|
||||
android:orientation="horizontal"
|
||||
tools:ignore="UselessParent">
|
||||
|
||||
<Button
|
||||
android:id="@+id/dummy_button"
|
||||
style="?metaButtonBarButtonStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/dummy_button" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/cloudsky"
|
||||
android:gravity="top"
|
||||
android:keepScreenOn="true"
|
||||
android:text="@string/dummy_content"
|
||||
android:textSize="50dp"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
</FrameLayout>
|
||||
|
||||
</FrameLayout>
|
@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_search"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_search"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="60dp"
|
||||
android:gravity="center"
|
||||
android:text="搜索"
|
||||
android:textSize="28sp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:background="#1296db"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="320dp"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="20dp"
|
||||
android:layout_margin="20dp"
|
||||
android:background="#1296db">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/weather"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="60dp"
|
||||
android:textColor="#d4237a"
|
||||
android:textSize="28sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"/>
|
||||
</LinearLayout>
|
@ -0,0 +1,12 @@
|
||||
<resources>
|
||||
|
||||
<!-- Declare custom theme attributes that allow changing which styles are
|
||||
used for button bars depending on the API level.
|
||||
?android:attr/buttonBarStyle is new as of API 11 so this is
|
||||
necessary to support previous API levels. -->
|
||||
<declare-styleable name="ButtonBarContainerTheme">
|
||||
<attr name="metaButtonBarStyle" format="reference" />
|
||||
<attr name="metaButtonBarButtonStyle" format="reference" />
|
||||
</declare-styleable>
|
||||
|
||||
</resources>
|