Skip to content

Commit

Permalink
Build177
Browse files Browse the repository at this point in the history
  - Updated button style
  • Loading branch information
Hamza417 committed Jun 2, 2023
1 parent b179fdd commit 386f6b2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,19 @@
import android.graphics.Color;
import android.util.AttributeSet;

import androidx.core.content.res.ResourcesCompat;

import app.simple.positional.R;
import app.simple.positional.util.ColorUtils;

public class DynamicRippleButton extends androidx.appcompat.widget.AppCompatButton {
public DynamicRippleButton(Context context, AttributeSet attrs) {
super(context, attrs);
setBackgroundColor(Color.TRANSPARENT);
setAllCaps(false);
setTypeface(ResourcesCompat.getFont(context, R.font.bold));
setTextColor(ColorUtils.INSTANCE.resolveAttrColor(getContext(), R.attr.colorAppAccent));

if (!isInEditMode()) {
setBackground(Utils.getRippleDrawable(getContext(), getBackground(), 2F));
}
Expand Down
Binary file added app/src/main/res/font/bold.ttf
Binary file not shown.
1 change: 1 addition & 0 deletions app/src/main/res/layout/dialog_direction_target.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
android:id="@+id/cancel"
android:layout_width="wrap_content"
android:layout_height="@dimen/app_button_size"
android:textAllCaps="false"
android:layout_gravity="center_vertical"
android:text="@string/button_cancel"
android:textColor="@color/textPrimary" />
Expand Down

0 comments on commit 386f6b2

Please sign in to comment.