attempt fix ripple affect crash #302

This commit is contained in:
Elad Keyshawn 2016-09-04 15:38:38 +03:00
parent 7800c8ea91
commit e923b55d79
3 changed files with 24 additions and 10 deletions

View File

@ -26,6 +26,8 @@ dependencies {
compile 'com.android.support:support-v4:24.1.0'
compile 'com.android.support:design:24.1.0'
compile 'com.android.support:cardview-v7:21.0.+'
// compile 'com.balysv:material-ripple:1.0.2'
compile 'com.github.traex.rippleeffect:library:1.3'
androidTestCompile 'com.android.support:support-annotations:24.1.0'
androidTestCompile 'com.android.support.test:runner:0.5'

View File

@ -4,7 +4,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto">
xmlns:card_view="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/tools">
@ -57,16 +58,27 @@ android:orientation="vertical">
</LinearLayout>
</android.support.v7.widget.CardView>
<Button
<com.andexert.library.RippleView
android:id="@+id/more"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/get_content_card"
android:background="@drawable/get_content_ripple_shape"
android:textSize="20sp"
android:textColor="@color/white"
android:layout_margin="3dp"
android:textAllCaps="false"
android:text="Get Content"/>
android:layout_margin="5dp">
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/get_content_card"
android:background="@drawable/get_content_btn_shape"
android:textSize="20sp"
android:textColor="@color/white"
android:layout_margin="3dp"
android:textAllCaps="false"
android:text="@string/menu_zim_manager"/>
</com.andexert.library.RippleView>
<android.support.v7.widget.CardView

View File

@ -1859,7 +1859,7 @@ public class KiwixMobileActivity extends AppCompatActivity {
view.removeView(help);
} else if (!Constants.IS_CUSTOM_APP){
help = (LinearLayout) mActivity.getLayoutInflater().inflate(R.layout.help, null);
help.findViewById(R.id.get_content_card).setOnClickListener(card -> manageZimFiles(1));
// help.findViewById(R.id.get_content_card).setOnClickListener(card -> manageZimFiles(1));
view.addView(help);
}
// Workaround for #643