删除了旧版本。
|
@ -1,3 +0,0 @@
|
|||
# cache for current jar dependency. DO NOT EDIT.
|
||||
# format is <lastModified> <length> <SHA-1> <path>
|
||||
# Encoding is UTF-8
|
Before Width: | Height: | Size: 175 KiB |
Before Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 127 KiB |
Before Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 88 KiB |
Before Width: | Height: | Size: 175 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 130 KiB |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 88 KiB |
|
@ -1,68 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<include layout="@layout/header_award" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center"
|
||||
android:text="今日中奖名单"
|
||||
android:textColor="#FF0000"
|
||||
android:textSize="16sp"
|
||||
android:typeface="monospace" />
|
||||
|
||||
<View
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="1.5dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:background="#FF0000" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_award_new"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:enabled="false"
|
||||
android:hint=""
|
||||
android:lines="1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginTop="50dp"
|
||||
android:gravity="center"
|
||||
android:text="昨日中奖名单"
|
||||
android:textColor="#FF0000"
|
||||
android:textSize="16sp"
|
||||
android:typeface="monospace" />
|
||||
|
||||
<View
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="1.5dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:background="#FF0000" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_award_old"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:enabled="false"
|
||||
android:hint=""
|
||||
android:lines="1" />
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
|
@ -0,0 +1,82 @@
|
|||
package com.stone.shop.adapter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.stone.shop.R;
|
||||
import com.stone.shop.model.News;
|
||||
|
||||
import android.R.integer;
|
||||
import android.content.Context;
|
||||
import android.graphics.pdf.PdfDocument.Page;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.TextView;
|
||||
|
||||
/**
|
||||
* 新闻列表适配器
|
||||
*
|
||||
* @date 2014-5-3
|
||||
* @author Stone
|
||||
*/
|
||||
public class NewsListAdapter extends BaseAdapter {
|
||||
|
||||
private Context mContext;
|
||||
private LayoutInflater mInflater = null;
|
||||
private List<News> mNewsList = null; // 所选分类下的所有店铺列表
|
||||
|
||||
public NewsListAdapter(Context context, List<News> newsList) {
|
||||
mContext = context;
|
||||
mNewsList = newsList;
|
||||
mInflater = LayoutInflater.from(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return mNewsList.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getItem(int position) {
|
||||
return mNewsList.get(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int position) {
|
||||
return position;
|
||||
}
|
||||
|
||||
// 刷新列表中的数据
|
||||
public void refresh(ArrayList<News> list) {
|
||||
mNewsList = list;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
NewsHolder newsHolder;
|
||||
if (convertView == null) {
|
||||
convertView = mInflater.inflate(R.layout.news_list_item, null);
|
||||
newsHolder = new NewsHolder();
|
||||
newsHolder.tvNewsType = (TextView) convertView
|
||||
.findViewById(R.id.tv_news_type);
|
||||
newsHolder.tvNewsTitle = (TextView) convertView
|
||||
.findViewById(R.id.tv_news_title);
|
||||
newsHolder.tvNewsDate = (TextView) convertView
|
||||
.findViewById(R.id.tv_news_date);
|
||||
convertView.setTag(newsHolder);
|
||||
} else {
|
||||
newsHolder = (NewsHolder) convertView.getTag();
|
||||
}
|
||||
//拆分字符串,只取年月日
|
||||
String[] ss = new String[2];
|
||||
ss = mNewsList.get(position).getCreatedAt().split(" ");
|
||||
newsHolder.tvNewsType.setText(mNewsList.get(position).getType()); //新闻类型
|
||||
newsHolder.tvNewsTitle.setText(mNewsList.get(position).getTitle()); //新闻标题
|
||||
newsHolder.tvNewsDate.setText(ss[0]); //新闻发布日期
|
||||
return convertView;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
package com.stone.shop.adapter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.stone.shop.R;
|
||||
import com.stone.shop.model.News;
|
||||
|
||||
import android.R.integer;
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.TextView;
|
||||
|
||||
/**
|
||||
* 新闻列表适配器
|
||||
*
|
||||
* @date 2014-5-3
|
||||
* @author Stone
|
||||
*/
|
||||
public class NewsListAdapter extends BaseAdapter {
|
||||
|
||||
private Context mContext;
|
||||
private LayoutInflater mInflater = null;
|
||||
private List<News> mNewsList = null; // 所选分类下的所有店铺列表
|
||||
|
||||
public NewsListAdapter(Context context, List<News> newsList) {
|
||||
mContext = context;
|
||||
mNewsList = newsList;
|
||||
mInflater = LayoutInflater.from(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return mNewsList.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getItem(int position) {
|
||||
return mNewsList.get(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int position) {
|
||||
return position;
|
||||
}
|
||||
|
||||
// 刷新列表中的数据
|
||||
public void refresh(ArrayList<News> list) {
|
||||
mNewsList = list;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
NewsHolder newsHolder;
|
||||
if (convertView == null) {
|
||||
convertView = mInflater.inflate(R.layout.news_list_item, null);
|
||||
newsHolder = new NewsHolder();
|
||||
newsHolder.tvNewsType = (TextView) convertView
|
||||
.findViewById(R.id.tv_news_type);
|
||||
newsHolder.tvNewsTitle = (TextView) convertView
|
||||
.findViewById(R.id.tv_news_title);
|
||||
newsHolder.tvNewsDate = (TextView) convertView
|
||||
.findViewById(R.id.tv_news_date);
|
||||
convertView.setTag(newsHolder);
|
||||
} else {
|
||||
newsHolder = (NewsHolder) convertView.getTag();
|
||||
}
|
||||
//拆分字符串,只取年月日
|
||||
String[] ss = new String[2];
|
||||
ss = mNewsList.get(position).getCreatedAt().split(" ");
|
||||
newsHolder.tvNewsType.setText(mNewsList.get(position).getType()); //新闻类型
|
||||
newsHolder.tvNewsTitle.setText(mNewsList.get(position).getTitle()); //新闻标题
|
||||
newsHolder.tvNewsDate.setText(ss[0]); //新闻发布日期
|
||||
return convertView;
|
||||
}
|
||||
|
||||
}
|