@string/constellation_aries
@string/constellation_taurus
@string/constellation_gemini
@string/constellation_cancer
@string/constellation_leo
@string/constellation_virgo
@string/constellation_libra
@string/constellation_scorpio
@string/constellation_sagittarius
@string/constellation_capricorn
@string/constellation_aquarius
@string/constellation_pisces
String constellation = DateTimeUtil.getConstellation(getResources().getStringArray(R.array.user_constellation),month,day);
java版本数据
public static final String[] contellationArr = {“水瓶座”,“双鱼座”,“白羊座”,“金牛座”,“双子座”,“巨蟹座”,“狮子座”,“处女座”,“天秤座”,“天蝎座”,“射手座”,“魔羯座”};
//contellationArr 星座的数组
//month 月份
//day 日
public static String getConstellation(String [] contellationArr,int month,int day){
int point = -1;
Double date = Double.parseDouble(month + “.” + day);
if (3.21 <= date && 4.19 >= date) {
point = 0;
} else if (4.20 <= date && 5.20 >= date) {
point = 1;
} else if (5.21 <= date && 6.21 >= date) {
point = 2;
} else if (6.22 <= date && 7.22 >= date) {
point = 3;
} else if (7.23 <= date && 8.22 >= date) {
point = 4;
} else if (8.23 <= date && 9.22 >= date) {
point = 5;
} else if (9.23 <= date && 10.23 >= date) {
point = 6;
} else if (10.24 <= date && 11.22 >= date) {
point = 7;
} else if (11.23 <= date && 12.21 >= date) {
point = 8;
} else if (12.22 <= date && 12.31 >= date) {
point = 9;
} else if (1.01 <= date && 1.19 >= date) {
point = 9;
} else if (1.20 <= date && 2.18 >= date) {
point = 10;
} else if (2.19 <= date && 3.20 >= date) {
point = 11;
}
学习分享
①「Android面试真题解析大全」PDF完整高清版+②「Android面试知识体系」学习思维导图压缩包
网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!
.csdn.net/topics/618156601)**
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!