首先感谢您阅读此内容:)
这是我的问题。
我有一个EditText(用户日期输入),我希望使用DayDecorator在我的CustomCalander上获得彩色背景。
//EditText I want to get the date
huablauf = (EditText)getActivity().findViewById(R.id.huablauf);
//adding calendar day decorators
List<DayDecorator> decorators = new ArrayList<>();
decorators.add(new Markierung());
calendarView.setDecorators(decorators);
calendarView.refreshCalendar(currentCalendar);
//class Markierung
private class Markierung implements DayDecorator {
EditText huablauf=(EditText)getActivity().findViewById(R.id.huablauf);
@Override
public void decorate(DayView dayView) {
// I know I have to get my String to a date and then get it to
// dayView.getDate()! But my code didn´t work
dayView.getDate();
int color = Color.parseColor("#f9acb8");
dayView.setBackgroundColor(color);
}
希望你能理解我的问题,任何人都可以提供帮助:)
来自巴伐利亚的Thx答案 0 :(得分:0)
试试这个:
<?php
$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
$args = array(
'posts_per_page' => 3,
'paged' => $paged
);
$the_query = new WP_Query( $args );
?>
<?php if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
<p><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></p>
<?php endwhile; ?>
<!-- pagination -->
<?php next_posts_link(); ?>
<?php previous_posts_link(); ?>
<?php else : ?>
<!-- No posts found -->
<?php endif; ?>