Skip to content

Commit

Permalink
## 4.6.0.2
Browse files Browse the repository at this point in the history
* Bug Fixes
  * correction of Ukraine typographic errors
  * fix support for legacy LayerDrawables in ATAK for rendering custom badging over existing icons
  • Loading branch information
takdeveloper committed Oct 18, 2024
2 parents 6d011e2 + d0f9048 commit 44216aa
Show file tree
Hide file tree
Showing 23 changed files with 490 additions and 327 deletions.
6 changes: 6 additions & 0 deletions VERSION.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Version History

## 4.6.0.2

* Bug Fixes
* correction of Ukraine typographic errors
* fix support for legacy LayerDrawables in ATAK for rendering custom badging over existing icons

## 4.6.0.1

* Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion atak/ATAK/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ buildscript {
apply from: '../../gradle/versions.gradle', to: project

ext.ATAK_VERSION = "4.6.0"
ext.ATAK_VERSION_SUBMINOR = ".1"
ext.ATAK_VERSION_SUBMINOR = ".2"

ext.isDevKitEnabled = { ->
return getProperty('takRepoMavenUrl', null) != null &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,19 @@
import android.graphics.RectF;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.LayerDrawable;
import android.renderscript.Allocation;
import android.renderscript.Element;
import android.renderscript.RenderScript;
import android.renderscript.ScriptIntrinsicBlur;
import android.renderscript.Type;
import android.widget.ImageView;

import com.atakmap.android.gui.drawable.ShadowDrawable;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.atakmap.android.gui.drawable.ShadowDrawable;

/**
* Drawable icon used for {@link NavButton} and other nav-related icons
* Supports dynamic shadow below the icon
Expand Down Expand Up @@ -78,6 +79,7 @@ public class NavButtonDrawable extends Drawable implements Drawable.Callback {

public NavButtonDrawable(Context appContext, Drawable baseDrawable) {
_context = appContext;

_baseDrawable = baseDrawable;
_baseDrawable.setCallback(this);
_basePaint = new Paint(
Expand Down Expand Up @@ -229,6 +231,28 @@ public void draw(@NonNull Canvas canvas) {

// Draw the top-right and bottom-right badges
drawBadges(canvas);


// restore original behavior with the layer drawable used for icons
// for simple counting one should make use of the badging capability
// within the following example -
//NavButtonModel mdl = NavButtonManager.getInstance()
// .getModelByPlugin(HelloWorldTool.this);
//if (mdl != null) {
// // Increment the badge count and refresh
// mdl.setBadgeCount(++count);
// NavButtonManager.getInstance().notifyModelChanged(mdl);
// Log.d(TAG, "increment visual count to: " + count);
//}

if (_baseDrawable instanceof LayerDrawable) {
LayerDrawable layer = (LayerDrawable) _baseDrawable;
for (int i = 1; i < layer.getNumberOfLayers();++i) {
Drawable d = layer.getDrawable(i);
d.draw(canvas);
}
}

}

private void setupScratchCanvas() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,30 @@ public boolean onPreferenceClick(Preference preference) {
}
});

Preference gridLinesPreference = (Preference) findPreference(
"colorTinting");
gridLinesPreference
.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
showScreen(new ColorAndTintingPreferenceFragment());
return true;
}
});
Preference my_location_icon_preference = findPreference(
"my_location_icon_color");
my_location_icon_preference
.setOnPreferenceClickListener(
new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(
Preference preference) {
showScreen(new SelfMarkerCustomFragment());
return true;
}
});

Preference actionbarCustomize = findPreference("my_actionbar_settings");
actionbarCustomize
.setOnPreferenceClickListener(
new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(
Preference preference) {
showScreen(new ActionBarPreferences());
return true;
}
});

Preference layerOutlinesPreference = (Preference) findPreference(
"additionalDisplay");
Expand Down
Loading

0 comments on commit 44216aa

Please sign in to comment.