-Change the buttons style to the buttons to material one in the fragment_general_settings.xml and java source

-Add the new buttons push animation to the buttons in the fragment_general_settings.xml and java source
This commit is contained in:
dtvv 2018-10-12 04:41:23 -05:00
parent ad65111f92
commit b33bbc11fc
2 changed files with 19 additions and 3 deletions

View file

@ -15,10 +15,12 @@ import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.ArrayAdapter; import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText; import android.widget.EditText;
import android.widget.Spinner; import android.widget.Spinner;
import android.widget.TextView; import android.widget.TextView;
import com.thekhaeng.pushdownanim.PushDownAnim;
import com.vincent.filepicker.Constant; import com.vincent.filepicker.Constant;
import com.vincent.filepicker.activity.AudioPickActivity; import com.vincent.filepicker.activity.AudioPickActivity;
import com.vincent.filepicker.filter.entity.AudioFile; import com.vincent.filepicker.filter.entity.AudioFile;
@ -71,6 +73,8 @@ public class GeneralSettingsFragment extends Fragment {
Spinner spDisplayDateTime; Spinner spDisplayDateTime;
@BindView (R.id.tvReceiveFundsSoundValue) @BindView (R.id.tvReceiveFundsSoundValue)
TextView tvReceiveFundsSound; TextView tvReceiveFundsSound;
@BindView (R.id.btnContact)
Button btnContact;
public GeneralSettingsFragment() { public GeneralSettingsFragment() {
this.spPreferredLanguageInitialized = false; this.spPreferredLanguageInitialized = false;
@ -99,6 +103,17 @@ public class GeneralSettingsFragment extends Fragment {
View v = inflater.inflate(R.layout.fragment_general_settings, container, false); View v = inflater.inflate(R.layout.fragment_general_settings, container, false);
ButterKnife.bind(this, v); ButterKnife.bind(this, v);
/*
* Integration of library with button efects
* */
PushDownAnim.setPushDownAnimTo(btnContact)
.setOnClickListener( new View.OnClickListener(){
@Override
public void onClick( View view ){
}
} );
generalSettingListViewModel = ViewModelProviders.of(this).get(GeneralSettingListViewModel.class); generalSettingListViewModel = ViewModelProviders.of(this).get(GeneralSettingListViewModel.class);
generalSettingListLiveData = generalSettingListViewModel.getGeneralSettingList(); generalSettingListLiveData = generalSettingListViewModel.getGeneralSettingList();

View file

@ -2,6 +2,7 @@
<ScrollView <ScrollView
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
@ -184,14 +185,14 @@
app:layout_constraintTop_toBottomOf="@id/tvCloseWalletTimer"/> app:layout_constraintTop_toBottomOf="@id/tvCloseWalletTimer"/>
<Button <Button
android:id="@+id/btnContact"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="45dp"
android:layout_marginTop="30dp" android:layout_marginTop="30dp"
android:background="@color/colorPrimary"
android:text="CONTACT" android:text="CONTACT"
android:theme="@style/BlueButton"
android:textColor="@color/white" android:textColor="@color/white"
android:textStyle="bold" android:textStyle="bold"
android:theme="@style/BlueButton"
app:layout_constraintEnd_toEndOf="@id/sCloseWalletTimer" app:layout_constraintEnd_toEndOf="@id/sCloseWalletTimer"
app:layout_constraintTop_toBottomOf="@id/tvCloseWalletTimer" /> app:layout_constraintTop_toBottomOf="@id/tvCloseWalletTimer" />