Skip to content

Commit 5b13a15

Browse files
committed
[commit] fixed app bug
1 parent e4099c7 commit 5b13a15

File tree

5 files changed

+9
-11
lines changed

5 files changed

+9
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ compile 'com.code19.library:library:0.0.7'
1414
- 如果你有更好的代码,请提交<a href="https://github.com/h4de5ing/AndroidCommon/pulls">Pull request</a>
1515

1616
* 感谢各位的star,你们的支持是我继续的动力,好了,本着多一点真诚,少一点套路的原则,完善一下文档
17-
* 为了让更多人用上这个库,现在推出Eclipse <a href="https://github.com/h4de5ing/AndroidCommon/blob/master/com.code19.library-0.07.jar">lib下载</a>
17+
* 为了让更多人用上这个库,现在推出Eclipse <a href="https://github.com/h4de5ing/AndroidCommon/raw/master/com.code19.library-0.07.jar">lib下载</a>
1818

1919
```
2020
调用方法如此简单:

app/src/main/java/com/code19/androidcommon/ui/activity/AppManagerActivity.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,15 @@
1919
import android.app.ProgressDialog;
2020
import android.os.Bundle;
2121
import android.support.v7.app.AppCompatActivity;
22-
import android.support.v7.widget.DefaultItemAnimator;
2322
import android.support.v7.widget.GridLayoutManager;
2423
import android.support.v7.widget.RecyclerView;
25-
import android.util.Log;
2624

2725
import com.code19.androidcommon.R;
2826
import com.code19.androidcommon.model.AppBean;
2927
import com.code19.androidcommon.presenter.AppPresenter;
3028
import com.code19.androidcommon.ui.adapter.AppRecyAdapter;
3129
import com.code19.androidcommon.view.IAppView;
30+
import com.code19.library.L;
3231

3332
import java.util.List;
3433

@@ -44,9 +43,8 @@ protected void onCreate(Bundle savedInstanceState) {
4443
super.onCreate(savedInstanceState);
4544
setContentView(R.layout.activity_app_manager);
4645
mRecyapp = (RecyclerView) findViewById(R.id.recy_app);
47-
mRecyapp.setHasFixedSize(true);
4846
mRecyapp.setLayoutManager(new GridLayoutManager(this, 4));
49-
mRecyapp.setItemAnimator(new DefaultItemAnimator());
47+
mRecyapp.setHasFixedSize(true);
5048
initProgress();
5149
mPresenter = new AppPresenter(this, this);
5250
new Thread(new Runnable() {
@@ -78,7 +76,7 @@ public void hideLoading() {
7876
@Override
7977
public void referData(List<AppBean> list) {
8078
for (AppBean bean : list) {
81-
Log.i(TAG, "app: " + bean.toString());
79+
L.i(TAG, "app: " + bean.toString());
8280
}
8381
mRecyapp.setAdapter(new AppRecyAdapter(this, list));
8482
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<RelativeLayout
2+
<android.support.design.widget.CoordinatorLayout
33
xmlns:android="http://schemas.android.com/apk/res/android"
44
xmlns:tools="http://schemas.android.com/tools"
55
android:layout_width="match_parent"
@@ -10,5 +10,5 @@
1010
<android.support.v7.widget.RecyclerView
1111
android:id="@+id/recy_app"
1212
android:layout_width="match_parent"
13-
android:layout_height="match_parent"/>
14-
</RelativeLayout>
13+
android:layout_height="wrap_content"/>
14+
</android.support.design.widget.CoordinatorLayout>

app/src/main/res/layout/activity_main.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
<EditText
7878
android:layout_width="match_parent"
7979
android:layout_height="wrap_content"
80-
/>
80+
tools:ignore="TextFields"/>
8181
<!--
8282
android:inputType="phone"
8383
android:inputType="none"

app/src/main/res/layout/app_recy.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
33
android:layout_width="match_parent"
4-
android:layout_height="match_parent"
4+
android:layout_height="wrap_content"
55
android:orientation="vertical"
66
android:paddingLeft="5dp"
77
android:paddingTop="5dp">

0 commit comments

Comments
 (0)