|
|
@@ -13,6 +13,7 @@ import android.view.Menu;
|
|
|
import android.view.MenuItem;
|
|
|
import android.view.View;
|
|
|
|
|
|
+import com.common.ui.ViewUtils;
|
|
|
import com.core.app.AppConstant;
|
|
|
import com.core.app.Constants;
|
|
|
import com.core.base.BaseActivity;
|
|
|
@@ -40,14 +41,14 @@ public class UUHelperActivity extends BaseActivity implements View.OnClickListen
|
|
|
|
|
|
@Override
|
|
|
public boolean onCreateOptionsMenu(Menu menu) {
|
|
|
- getMenuInflater().inflate(R.menu.menu_uuhelper,menu);
|
|
|
+ getMenuInflater().inflate(R.menu.menu_uuhelper, menu);
|
|
|
return super.onCreateOptionsMenu(menu);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public boolean onOptionsItemSelected(MenuItem item) {
|
|
|
- if (item.getItemId()==R.id.menuMe){
|
|
|
- startActivity(new Intent(ct,UUHelperDetailsActivity.class));
|
|
|
+ if (item.getItemId() == R.id.menuMe) {
|
|
|
+ startActivity(new Intent(ct, UUHelperDetailsActivity.class));
|
|
|
}
|
|
|
return super.onOptionsItemSelected(item);
|
|
|
}
|
|
|
@@ -71,10 +72,12 @@ public class UUHelperActivity extends BaseActivity implements View.OnClickListen
|
|
|
private void initView() {
|
|
|
contentRV = (RecyclerView) findViewById(R.id.contentRV);
|
|
|
contentRV.setItemAnimator(new DefaultItemAnimator());
|
|
|
- contentRV.setLayoutManager(new LinearLayoutManager(ct));
|
|
|
+ LinearLayoutManager linearLayoutManager = new LinearLayoutManager(ct);
|
|
|
+ contentRV.setLayoutManager(linearLayoutManager);
|
|
|
findViewById(R.id.successfulTV).setOnClickListener(this);
|
|
|
findViewById(R.id.experienceTV).setOnClickListener(this);
|
|
|
findViewById(R.id.serviceTV).setOnClickListener(this);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
private void initData() {
|
|
|
@@ -112,9 +115,10 @@ public class UUHelperActivity extends BaseActivity implements View.OnClickListen
|
|
|
mAdapter.setModels(models);
|
|
|
mAdapter.notifyDataSetChanged();
|
|
|
}
|
|
|
- contentRV.scrollToPosition(models.size() - 1);
|
|
|
+ ViewUtils.moveRecyclerView2Postion(contentRV, models.size());
|
|
|
}
|
|
|
|
|
|
+
|
|
|
@Override
|
|
|
public void onClick(View v) {
|
|
|
int id = v.getId();
|