我使用了ProgressBarDeterminate并使用了它的一些属性,但它显示错误,说无法解析ProgressBarDeterminate
答案 0 :(得分:0)
使用下面的代码
@Bean
public Properties hibernateProperties(){
final Properties properties = new Properties();
properties.put("javax.persistence.provider", "org.hibernate.ogm.jpa.HibernateOgmPersistence");
properties.put("javax.persistence.transactionType", "RESOURCE_LOCAL");
properties.put("hibernate.ogm.datastore.provider", "redis_experimental");
properties.put("hibernate.ogm.datastore.host", "127.0.0.1:6379");
properties.put("hibernate.cache.use_second_level_cache", "true");
properties.put("hibernate.cache.region.factory_class", "org.hibernate.cache.redis.hibernate5.SingletonRedisRegionFactory");
properties.put("hibernate.cache.region_prefix", "hibernate");
properties.put("hibernate.cache.use_query_cache", "true");
properties.put("hibernate.cache.provider_configuration_file_resource_path", "hibernate-redis.properties");
return properties;
}
@Bean
public EntityManager entityManager(Properties hibernateProperties){
final EntityManagerFactory factory = Persistence.createEntityManagerFactory("ogm-jpa", hibernateProperties);
return factory.createEntityManager();
}
java文件
<ProgressBar android:id="@+id/progressBar"
style="?android:attr/progressBarStyleHorizontal"