-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added addOnly() and removeOnly() method
- Loading branch information
hb
committed
Oct 18, 2018
1 parent
c30dd37
commit 47b6a9c
Showing
14 changed files
with
201 additions
and
34 deletions.
There are no files selected for viewing
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
20 changes: 20 additions & 0 deletions
20
app/src/main/java/easyadapter/dc/com/easyadapter/CategoryAdapterJava.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,20 @@ | ||
package easyadapter.dc.com.easyadapter; | ||
|
||
import android.support.annotation.NonNull; | ||
|
||
import easyadapter.dc.com.easyadapter.databinding.InflaterCategoryBinding; | ||
import easyadapter.dc.com.library.EasyAdapter; | ||
|
||
/** | ||
* Created by HB on 1/10/18. | ||
*/ | ||
public class CategoryAdapterJava extends EasyAdapter<Category, InflaterCategoryBinding> { | ||
public CategoryAdapterJava() { | ||
super(R.layout.inflater_category); | ||
} | ||
|
||
@Override | ||
public void onBind(@NonNull InflaterCategoryBinding binding, @NonNull Category model) { | ||
binding.tvName.setText(model.getName()); | ||
} | ||
} |
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
23 changes: 23 additions & 0 deletions
23
app/src/main/java/easyadapter/dc/com/easyadapter/MainActivityJava.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,23 @@ | ||
package easyadapter.dc.com.easyadapter; | ||
|
||
import android.databinding.DataBindingUtil; | ||
import android.databinding.ViewDataBinding; | ||
import android.os.Bundle; | ||
import android.support.annotation.NonNull; | ||
import android.support.annotation.Nullable; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.support.v7.widget.RecyclerView; | ||
|
||
import easyadapter.dc.com.library.EasyAdapter; | ||
|
||
/** | ||
* Created by HB on 15/10/18. | ||
*/ | ||
public class MainActivityJava extends AppCompatActivity { | ||
|
||
@Override | ||
protected void onCreate(@Nullable Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
|
||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
app/src/main/java/easyadapter/dc/com/easyadapter/TestActivity.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,21 @@ | ||
package easyadapter.dc.com.easyadapter; | ||
|
||
import android.os.Bundle; | ||
import android.support.annotation.Nullable; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.support.v7.widget.LinearLayoutManager; | ||
import android.support.v7.widget.RecyclerView; | ||
|
||
/** | ||
* Created by HB on 28/9/18. | ||
*/ | ||
public class TestActivity extends AppCompatActivity { | ||
@Override | ||
protected void onCreate(@Nullable Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_test); | ||
RecyclerView recyclerView = findViewById(R.id.recyclerView); | ||
CategoryAdapter categoryAdapter = new CategoryAdapter(false); | ||
recyclerView.setAdapter(categoryAdapter); | ||
} | ||
} |
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,7 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
<gradient | ||
android:startColor="@color/colorPrimary" | ||
android:endColor="@color/colorAccent" /> | ||
</shape> |
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
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,73 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools"> | ||
|
||
<RelativeLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<FrameLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent"> | ||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical"> | ||
|
||
<FrameLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content"> | ||
|
||
<android.support.v7.widget.RecyclerView | ||
android:id="@+id/recyclerView" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:visibility="visible" | ||
tools:listitem="@layout/inflater_category" /> | ||
</FrameLayout> | ||
|
||
<FrameLayout | ||
android:layout_margin="20dp" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content"> | ||
|
||
|
||
<View | ||
android:layout_marginLeft="5dp" | ||
android:layout_marginRight="5dp" | ||
android:layout_gravity="center" | ||
android:layout_width="match_parent" | ||
android:layout_height="4dp" | ||
android:background="@drawable/gradient_drawable" /> | ||
|
||
<com.warkiz.widget.IndicatorSeekBar | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
app:isb_indicator_color="@color/colorPrimary" | ||
app:isb_indicator_text_color="@color/colorAccent" | ||
app:isb_indicator_text_size="18sp" | ||
app:isb_max="5" | ||
app:isb_min="0.30" | ||
app:isb_progress_value_float="true" | ||
app:isb_seek_smoothly="false" | ||
app:isb_show_indicator="rounded_rectangle" | ||
app:isb_show_tick_texts="true" | ||
app:isb_thumb_color="@color/colorPrimary" | ||
app:isb_thumb_size="20dp" | ||
app:isb_tick_texts_color="@color/colorPrimary" | ||
app:isb_tick_texts_size="0sp" | ||
app:isb_ticks_count="16" | ||
app:isb_track_background_color="@android:color/transparent" | ||
app:isb_track_background_size="4dp" | ||
app:isb_track_progress_color="@android:color/transparent" | ||
app:isb_track_progress_size="4dp" /> | ||
</FrameLayout> | ||
</LinearLayout> | ||
</FrameLayout> | ||
|
||
</RelativeLayout> | ||
|
||
|
||
</layout> |
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
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
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