Skip to content

Commit

Permalink
Merge pull request #12 from CaptainHuangsh/8-reconsitution-code
Browse files Browse the repository at this point in the history
8 reconsitution code
  • Loading branch information
CaptainHuangsh authored Apr 22, 2017
2 parents f5954d3 + 9f5a1e9 commit 86593bd
Show file tree
Hide file tree
Showing 15 changed files with 114 additions and 336 deletions.
1 change: 0 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".modules.main.activity.Stud"/>
<activity android:name=".modules.main.activity.LoginActivity"/>
<activity android:name=".modules.main.activity.LogingActivity"/>
<meta-data
Expand Down

This file was deleted.

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);
}
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) {

}

}

This file was deleted.

Loading

0 comments on commit 86593bd

Please sign in to comment.