mirror of
https://github.com/atsunatsu/Look4Sat.git
synced 2026-10-04 03:37:21 +00:00
feat(radar,cw): transponder CW panel switches to the Morse Expert engine
Background: the transponder panel CW decoder (added by the upstream fork author) used a lightweight Kotlin Bayesian engine (core/domain/cw, kept untouched as a fallback). This change makes the panel use the Morse Expert engine ported in 4.5.0, so both CW entry points share the same decoder with a live waterfall. Changes: - New mini layout cw_panel_main.xml (waterfall 80dp + decoded text, status line hidden but ID kept for controller lookup) - MainActivity.onCreate overload with applyImmersive flag; panel binds with false so the host window system bars are not touched - CwDecoderPanel now embeds the mini layout via AndroidView and drives the MainActivity controller: start/stop/reset map to the engine, lifecycle follows panel expand (start) / collapse (release mic) - radar module now depends on feature:cw (+ constraintlayout 2.2.1, same as cw) for layout + controller reuse - What's new rewritten in EN/TR/ZH for this release only Verified: :feature:radar:compileDebugKotlin and :app:compileDebugKotlin BUILD SUCCESSFUL locally; check_strings.py OK (7 files, no bare apostrophes).
This commit is contained in:
1 parent
f731775346
commit
47f3e424ff
7 files changed
+139
-49
No files matched your search
@@ -48,9 +48,19 @@ public class MainActivity {
|
||||
public android.app.Activity mActivity;
|
||||
|
||||
public void onCreate(android.app.Activity activity, ConstraintLayout constraintLayout) {
|
||||
onCreate(activity, constraintLayout, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* applyImmersive=false 用于嵌入小容器(如转发器 CW 面板):
|
||||
* 不触碰宿主窗口的系统栏标志(避免影响整个 Activity)。
|
||||
*/
|
||||
public void onCreate(android.app.Activity activity, ConstraintLayout constraintLayout, boolean applyImmersive) {
|
||||
this.mActivity = activity;
|
||||
// K1.a.M(getWindow(), false): immersive status bar (nav/fullscreen flags, ported as-is)
|
||||
setImmersive(activity.getWindow(), false);
|
||||
if (applyImmersive) {
|
||||
// K1.a.M(getWindow(), false): immersive status bar (nav/fullscreen flags, ported as-is)
|
||||
setImmersive(activity.getWindow(), false);
|
||||
}
|
||||
View inflate = constraintLayout;
|
||||
int i4 = R.id.decodedTextView;
|
||||
DecodedTextView decodedTextView = (DecodedTextView) findViewRecursive(inflate, R.id.decodedTextView);
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/verticalLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:keepScreenOn="true">
|
||||
<TextView
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="10sp"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="end"
|
||||
android:visibility="gone"
|
||||
android:id="@+id/statusTextView"
|
||||
android:background="@color/purple_500"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/idle"/>
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp">
|
||||
<com.ve3nea.morse_expert.WaterfallSurfaceView
|
||||
android:id="@+id/waterfallView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="@string/waterfall_display"/>
|
||||
<com.ve3nea.morse_expert.ScaleView
|
||||
android:id="@+id/scaleView"
|
||||
android:background="#24545a"
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0"
|
||||
android:contentDescription="@string/frequency_scale"/>
|
||||
</LinearLayout>
|
||||
<com.ve3nea.morse_expert.DecodedTextView
|
||||
android:textSize="12sp"
|
||||
android:typeface="monospace"
|
||||
android:textColor="#444444"
|
||||
android:textColorHint="#888888"
|
||||
android:gravity="start|top"
|
||||
android:id="@+id/decodedTextView"
|
||||
android:background="#d1f0f4"
|
||||
android:scrollbars="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:hint="@string/decoded_text"
|
||||
android:freezesText="false"
|
||||
android:layout_weight="1"
|
||||
android:minHeight="48dp"
|
||||
android:inputType="none"
|
||||
android:fadeScrollbars="false"
|
||||
android:textIsSelectable="true"/>
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
Reference in new issue
Block a user