Skip to content

Commit

Permalink
fix: Updated colours to match Zeta (#5)
Browse files Browse the repository at this point in the history
chore: Remove unnecessary icons from example app
chore: Add version to example app
feat: Add positive button variant
docs: Update button docs

Authored-by: mikecoomber <[email protected]>
Co-authored-by: thelukewalton <[email protected]>
Co-authored-by: github-actions <[email protected]>
  • Loading branch information
3 people committed Oct 25, 2024
1 parent 990ec23 commit 4e05e08
Show file tree
Hide file tree
Showing 75 changed files with 365 additions and 839 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
uses: gradle/actions/setup-gradle@v4
- name: Add environment variables
run: |
echo "username=${{secrets.ARTIFACTORY_USERNAME}}" >> gradle.properties
echo "password=${{secrets.ARTIFACTORY_PASSWORD}}" >> gradle.properties
echo "artifactoryusername=${{secrets.ARTIFACTORY_USERNAME}}" >> gradle.properties
echo "artifactorypassword=${{secrets.ARTIFACTORY_PASSWORD}}" >> gradle.properties
echo "zds-android-maven=${{secrets.ZDS_ANDROID_MAVEN}}" >> gradle.properties
- name: Publish
Expand Down
18 changes: 10 additions & 8 deletions app/src/main/java/com/zebra/zdsDemo/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,19 +161,21 @@ public void onDrawerOpened(@NonNull View drawerView) {
// Setup Navigation view header and footer
((TextView) navView.getHeaderView(0).findViewById(R.id.title)).setText("Title");
((TextView) navView.getHeaderView(0).findViewById(R.id.subtitle)).setText("Subtitle");
// ((TextView) findViewById(R.id.footer_subtitle)).setText("version " + BuildConfig.VERSION_NAME);

((AppCompatImageView) navView.getHeaderView(0).findViewById(R.id.image)).setImageResource(R.drawable.ic_baseline_emoji_emotions_24);
// x-release-please-start-version
((TextView) findViewById(R.id.footer_subtitle)).setText("ZDS Android v1.0.0");
// x-release-please-end
((AppCompatImageView) navView.getHeaderView(0).findViewById(R.id.image)).setImageResource(R.drawable.ic_happy_round);
((AppCompatImageView) navView.getHeaderView(0).findViewById(R.id.image)).setImageTintList(ColorStateList.valueOf(Color.WHITE));
((ZdsIconButton) navView.getHeaderView(0).findViewById(R.id.action)).setIconTint(ColorStateList.valueOf(Color.WHITE));
((ZdsIconButton) navView.getHeaderView(0).findViewById(R.id.action)).setIconResource(R.drawable.ic_baseline_settings_24);
((ZdsIconButton) navView.getHeaderView(0).findViewById(R.id.action)).setIconResource(R.drawable.ic_settings_round);

setMenuCounter(navView, R.id.buttonsFragment, 24);

// Setup support action bar
ActionBar actionbar = getSupportActionBar();
if (actionbar != null) {
actionbar.setDisplayHomeAsUpEnabled(true);
actionbar.setHomeAsUpIndicator(R.drawable.ic_baseline_menu_24);
actionbar.setHomeAsUpIndicator(R.drawable.ic_hamburger_menu_round);
}

getBanner().setOnClickListener(v -> hideBanner());
Expand Down Expand Up @@ -245,8 +247,8 @@ public ZdsSystemBanner getBanner() {

public void showBanner() {
ZdsSystemBanner.Style style = getBanner().getStyle();
int statusBarColor = R.color.zebra_black_toolbar;
switch(style) {
int statusBarColor = R.color.zebra_toolbar;
switch (style) {
case DEFAULT:
statusBarColor = R.color.zebra_blue_enabled;
break;
Expand All @@ -269,6 +271,6 @@ public void showBanner() {
public void hideBanner() {
((MotionLayout) findViewById(R.id.mainLayout)).transitionToStart();
getBanner().setVisibility(View.GONE);
getWindow().setStatusBarColor(ContextCompat.getColor(this, R.color.zebra_black_toolbar));
getWindow().setStatusBarColor(ContextCompat.getColor(this, R.color.zebra_toolbar));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ private void showDialog() {
ZdsDialog.Builder builder = new ZdsDialog.Builder(requireContext());
builder.setTitle("Dialog Title").setContent("Lorem ipsum dolor sit amet, conse ctetur adipiscing elit, sed do eiusm od tempor incididunt ut labore et do lore magna aliqua.");
if (titleImage.isChecked()) {
builder.setIcon(R.drawable.ic_baseline_warning_24);
builder.setIcon(R.drawable.ic_warning_round);
}
if (gravityRadioGroup.getCheckedRadioButtonId() == R.id.gravityLeft) {
builder.setTitleGravity(Gravity.START);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,18 @@ private void showMenu(View view, DropdownStyle style) {
case COUNTRY:
itemResId = R.layout.dropdown_item_icon;
items.clear();
items.add(new ListPopupItem("Option 1", R.drawable.ic_baseline_flag_24));
items.add(new ListPopupItem("Option 2", R.drawable.ic_baseline_flag_24));
items.add(new ListPopupItem("Option 3", R.drawable.ic_baseline_flag_24));
items.add(new ListPopupItem("Option 4", R.drawable.ic_baseline_flag_24));
items.add(new ListPopupItem("Option 1", R.drawable.ic_flag_round));
items.add(new ListPopupItem("Option 2", R.drawable.ic_flag_round));
items.add(new ListPopupItem("Option 3", R.drawable.ic_flag_round));
items.add(new ListPopupItem("Option 4", R.drawable.ic_flag_round));
break;
case COUNTRY_CONDENSED:
itemResId = R.layout.dropdown_item_icon_condensed;
items.clear();
items.add(new ListPopupItem("Option 1", R.drawable.ic_baseline_flag_24));
items.add(new ListPopupItem("Option 2", R.drawable.ic_baseline_flag_24));
items.add(new ListPopupItem("Option 3", R.drawable.ic_baseline_flag_24));
items.add(new ListPopupItem("Option 4", R.drawable.ic_baseline_flag_24));
items.add(new ListPopupItem("Option 1", R.drawable.ic_flag_round));
items.add(new ListPopupItem("Option 2", R.drawable.ic_flag_round));
items.add(new ListPopupItem("Option 3", R.drawable.ic_flag_round));
items.add(new ListPopupItem("Option 4", R.drawable.ic_flag_round));
break;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ public void onBindViewHolder(ZdsListItem.ZdsViewHolder viewHolder, final int pos
viewHolder.getIconRight().setImageTintList(ColorStateList.valueOf(Color.GRAY));

if (imageLeftCheckBox.isChecked()) {
viewHolder.showIconLeft(R.drawable.ic_baseline_star_24);
viewHolder.showIconLeft(R.drawable.ic_star_sharp);
}
else {
viewHolder.hideIconLeft();
}

switch (elementRightRadioGroup.getCheckedRadioButtonId()) {
case R.id.showImageRight:
viewHolder.showIconRight(R.drawable.ic_baseline_star_24);
viewHolder.showIconRight(R.drawable.ic_star_sharp);
break;
case R.id.showMeta:
viewHolder.setMeta("Meta");
Expand Down
5 changes: 0 additions & 5 deletions app/src/main/res/drawable/ic_baseline_add_24.xml

This file was deleted.

5 changes: 0 additions & 5 deletions app/src/main/res/drawable/ic_baseline_delete_24.xml

This file was deleted.

5 changes: 0 additions & 5 deletions app/src/main/res/drawable/ic_baseline_emoji_emotions_24.xml

This file was deleted.

5 changes: 0 additions & 5 deletions app/src/main/res/drawable/ic_baseline_flag_24.xml

This file was deleted.

5 changes: 0 additions & 5 deletions app/src/main/res/drawable/ic_baseline_invert_colors_24.xml

This file was deleted.

5 changes: 0 additions & 5 deletions app/src/main/res/drawable/ic_baseline_menu_24.xml

This file was deleted.

5 changes: 0 additions & 5 deletions app/src/main/res/drawable/ic_baseline_more_horiz_24.xml

This file was deleted.

5 changes: 0 additions & 5 deletions app/src/main/res/drawable/ic_baseline_more_vert_24.xml

This file was deleted.

5 changes: 0 additions & 5 deletions app/src/main/res/drawable/ic_baseline_sd_card_24.xml

This file was deleted.

5 changes: 0 additions & 5 deletions app/src/main/res/drawable/ic_baseline_search_24.xml

This file was deleted.

5 changes: 0 additions & 5 deletions app/src/main/res/drawable/ic_baseline_settings_24.xml

This file was deleted.

5 changes: 0 additions & 5 deletions app/src/main/res/drawable/ic_baseline_star_24.xml

This file was deleted.

5 changes: 0 additions & 5 deletions app/src/main/res/drawable/ic_baseline_warning_24.xml

This file was deleted.

Loading

0 comments on commit 4e05e08

Please sign in to comment.