与我之前的其他人一样,我正在寻找自定义expo android主题颜色和样式的方法,以自定义本地组件样式(例如DatePicker)。
我发现一个lot of posts解释了同样的旧情况:“以原生android方式更新您的样式!”
好的,但是我的React本机项目没有任何“ res / values / styles.xml”等。 从头开始创建它们没有效果。
在这里我要致命的只有一步,但是哪一步呢?
我的回购实际上看起来像这样:
.expo
/* a bunch of folders containing my custom js */
App.js
app.json
babel.config.js
package.json
package-lock.json
答案 0 :(得分:1)
您可以使用
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
@Entity
@Table(name="hospital")
public class Hospital {
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
@Column(name="hospitalid")
private int hospital_id;
@OneToMany(mappedBy="hospital",cascade={CascadeType.DETACH,CascadeType.MERGE,
CascadeType.PERSIST,CascadeType.PERSIST})
private List<HospitalDoctorEntity> doctorList;
public List<HospitalDoctorEntity> getDoctorList() {
return doctorList;
}
public void setDoctorList(List<HospitalDoctorEntity> doctorList) {
this.doctorList = doctorList;
}
public int getAccount_status() {
return account_status;
}
public void setAccount_status(int account_status) {
this.account_status = account_status;
}
public void setHospital_id(int hospital_id) {
this.hospital_id = hospital_id;
}
@Column(name="password")
private String password;
@Column(name="hospitalname")
private String hospitalName;
@Column(name="addressline1")
private String addressLine1;
@Column(name="addressline2")
private String addressLine2;
@Column(name="city")
private String city;
@Column(name="state")
private String state;
@GeneratedValue()
@Column(name="achievements")
private String achievements;
@GeneratedValue(strategy=GenerationType.SEQUENCE)
@Column(name="accountstatus")
private int account_status =0;
public int getHospital_id() {
return hospital_id;
}
public String getHospitalName() {
return hospitalName;
}
public void setHospitalName(String hospitalName) {
this.hospitalName = hospitalName;
}
public String getAddressLine1() {
return addressLine1;
}
public void setAddressLine1(String addressLine1) {
this.addressLine1 = addressLine1;
}
public String getAddressLine2() {
return addressLine2;
}
public void setAddressLine2(String addressLine2) {
this.addressLine2 = addressLine2;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getAchievements() {
return achievements;
}
public void setAchievements(String achievements) {
this.achievements = achievements;
}
}```
创建一个新的StyleSheet:
sam[] <- recode(sam,'Low Outlier'=0,
'High Outlier'=0,
'Novice'=1,
'Emerging'=2,
'Approaching'=3,
'Proficient'=4)
> sam
x y z
[1,] "0" "1" "0"
[2,] "0" "3" "4"
[3,] "1" "4" "3"
[4,] "1" "3" "2"
[5,] "2" "0" "0"
[6,] NA "4" "3"
[7,] "4" NA "3"
[8,] "3" "2" "2"
使用样式表:
Style Sheet.
这是详细信息link
要配置样式,例如const styles = StyleSheet.create({
container: {
borderRadius: 4,
borderWidth: 0.5,
borderColor: '#d6d7da',
},
title: {
fontSize: 19,
fontWeight: 'bold',
},
activeTitle: {
color: 'red',
},
});
,可以通过执行<View style={styles.container}>
<Text style={[styles.title, this.props.isActive && styles.activeTitle]} />
</View>
来分隔它。
执行Android.xml
后,您将获得Android文件夹。
关于“展览会弹出” link