-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from CaptainHuangsh/8-reconsitution-code
8 reconsitution code
- Loading branch information
Showing
15 changed files
with
114 additions
and
336 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 0 additions & 45 deletions
45
app/src/main/java/com/example/owen/weathergo/adapter/DLForecastAdapter.java
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
app/src/main/java/com/example/owen/weathergo/base/BaseViewHolder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.example.owen.weathergo.base; | ||
|
||
import android.support.v7.widget.RecyclerView; | ||
import android.view.View; | ||
|
||
import butterknife.ButterKnife; | ||
|
||
public abstract class BaseViewHolder<T> extends RecyclerView.ViewHolder { | ||
|
||
public BaseViewHolder(View itemView) { | ||
super(itemView); | ||
ButterKnife.bind(this, itemView); | ||
} | ||
|
||
protected abstract void bind(T t); | ||
} |
20 changes: 14 additions & 6 deletions
20
app/src/main/java/com/example/owen/weathergo/modules/dao/WeatherHolder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,39 @@ | ||
package com.example.owen.weathergo.modules.dao; | ||
|
||
import android.support.v7.widget.RecyclerView; | ||
import android.view.View; | ||
import android.widget.ImageView; | ||
import android.widget.TextView; | ||
|
||
import com.example.owen.weathergo.R; | ||
import com.example.owen.weathergo.base.BaseViewHolder; | ||
|
||
import butterknife.BindView; | ||
import butterknife.ButterKnife; | ||
|
||
/** | ||
* Created by owen on 2017/4/21. | ||
*/ | ||
|
||
public class WeatherHolder extends RecyclerView.ViewHolder { | ||
public class WeatherHolder extends BaseViewHolder { | ||
|
||
@BindView(R.id.forecast_icon) | ||
public ImageView img; | ||
@BindView(R.id.forecast_date) | ||
public TextView dayView; | ||
@BindView(R.id.forecast_temp) | ||
public TextView temprView; | ||
@BindView(R.id.forecast_txt) | ||
public TextView weamoreView; | ||
|
||
|
||
public WeatherHolder(View view) { | ||
super(view); | ||
img = (ImageView) view.findViewById(R.id.forecast_icon); | ||
dayView = (TextView) view.findViewById(R.id.forecast_date); | ||
temprView = (TextView) view.findViewById(R.id.forecast_temp); | ||
weamoreView = (TextView) view.findViewById(R.id.forecast_txt); | ||
ButterKnife.bind(this, view); | ||
} | ||
|
||
@Override | ||
protected void bind(Object o) { | ||
|
||
} | ||
|
||
} |
100 changes: 0 additions & 100 deletions
100
app/src/main/java/com/example/owen/weathergo/modules/main/activity/Stud.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.