Initial commit

This commit is contained in:
Lina committed 2026-02-11 16:06:50 +01:00
commit a864224bb9
57 files changed
+1706

No files matched your search

@@ -0,0 +1,26 @@
package pictures.tristagram.bodytuneup;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("pictures.tristagram.androidstudio", appContext.getPackageName());
}
}
+35
View File
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<application
android:allowBackup="false"
android:fullBackupContent="false"
android:dataExtractionRules="@xml/data_extraction_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.AndroidStudio">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
</application>
</manifest>
+14
View File
@@ -0,0 +1,14 @@
/*!
* Chart.js v3.9.1
* https://www.chartjs.org
* (c) 2022 Chart.js Contributors
* Released under the MIT License
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Chart=e()}(this,(function(){"use strict";function t(){}const e=function(){let t=0;return function(){return t++}}();function i(t){return null==t}function s(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function n(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const o=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function a(t,e){return o(t)?t:e}function r(t,e){return void 0===t?e:t}const l=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100:t/e,h=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function c(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function d(t,e,i,o){let a,r,l;if(s(t))if(r=t.length,o)for(a=r-1;a>=0;a--)e.call(i,t[a],a);else for(a=0;a<r;a++)e.call(i,t[a],a);else if(n(t))for(l=Object.keys(t),r=l.length,a=0;a<r;a++)e.call(i,t[l[a]],l[a])}function u(t,e){let i,s,n,o;if(!t||!e||t.length!==e.length)return!1;for(i=0,s=t.length;i<s;++i)if(n=t[i],o=e[i],n.datasetIndex!==o.datasetIndex||n.index!==o.index)return!1;return!0}function f(t){if(s(t))return t.map(f);if(n(t)){const e=Object.create(null),i=Object.keys(t),s=i.length;let n=0;for(;n<s;++n)e[i[n]]=f(t[i[n]]);return e}return t}function g(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function p(t,e,i,s){if(!g(t))return;const o=e[t],a=i[t];n(o)&&n(a)?m(o,a,s):e[t]=f(a)}function m(t,e,i){const o=s(e)?e:[e],a=o.length;if(!n(t))return t;const r=(i=i||{}).merger||p;for(let s=0;s<a;++s){if(!n(e=o[s]))continue;const a=Object.keys(e);for(let s=0,n=a.length;s<n;++s)r(a[s],t,e,i)}return t}function b(t,e){return m(t,e,{merger:x})}function x(t,e,i){if(!g(t))return;const s=e[t],o=i[t];n(s)&&n(o)?b(s,o):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=f(o))}const _={"":t=>t,x:t=>t.x,y:t=>t.y};function y(t,e){const i=_[e]||(_[e]=function(t){const e=v(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}function v(t){const e=t.split("."),i=[];let s="";for(const t of e)s+=t,s.endsWith("\\")?s=s.slice(0,-1)+".":(i.push(s),s="");return i}function w(t){return t.charAt(0).toUpperCase()+t.slice(1)}const M=t=>void 0!==t,k=t=>"function"==typeof t,S=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0};function P(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}const D=Math.PI,O=2*D,C=O+D,A=Number.POSITIVE_INFINITY,T=D/180,L=D/2,E=D/4,R=2*D/3,I=Math.log10,z=Math.sign;function F(t){const e=Math.round(t);t=N(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(I(t))),s=t/i;return(s<=1?1:s<=2?2:s<=5?5:10)*i}function V(t){const e=[],i=Math.sqrt(t);let s;for(s=1;s<i;s++)t%s==0&&(e.push(s),e.push(t/s));return i===(0|i)&&e.push(i),e.sort(((t,e)=>t-e)).pop(),e}function B(t){return!isNaN(parseFloat(t))&&isFinite(t)}function N(t,e,i){return Math.abs(t-e)<i}function W(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}function j(t,e,i){let s,n,o;for(s=0,n=t.length;s<n;s++)o=t[s][i],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function H(t){return t*(D/180)}function $(t){return t*(180/D)}function Y(t){if(!o(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function U(t,e){const i=e.x-t.x,s=e.y-t.y,n=Math.sqrt(i*i+s*s);let o=Math.atan2(s,i);return o<-.5*D&&(o+=O),{angle:o,distance:n}}function X(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function q(t,e){return(t-e+C)%O-D}function K(t){return(t%O+O)%O}function G(t,e,i,s){const n=K(t),o=K(e),a=K(i),r=K(o-n),l=K(a-n),h=K(n-o),c=K(n-a);return n===o||n===a||s&&o===a||r>l&&h<c}function Z(t,e,i){return Math.max(e,Math.min(i,t))}function J(t){return Z(t,-32768,32767)}function Q(t,e,i,s=1e-6){return t>=Math.min(e,i)-s&&t<=Math.max(e,i)+s}function tt(t,e,i){i=i||(i=>t[i]<e);let s,n=t.length-1,o=0;for(;n-o>1;)s=o+n>>1,i(s)?o=s:n=s;return{lo:o,hi:n}}const et=(t,e,i,s)=>tt(t,i,s?s=>t[s][e]<=i:s=>t[s][e]<i),it=(t,e,i)=>tt(t,i,(s=>t[s][e]>=i));function st(t,e,i){let s=0,n=t.length;for(;s<n&&t[s]<e;)s++;for(;n>s&&t[n-1]>i;)n--;return s>0||n<t.length?t.slice(s,n):t}const nt=["push","pop","shift","splice","unshift"];function ot(t,e){t._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),nt.forEach((e=>{const i="_onData"+w(e),s=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value(...e){const n=s.apply(this,e);return t._chartjs.listeners.forEach((t=>{"function"==typeof t[i]&&t[i](...e)})),n}})})))}function at(t,e){const i=t._chartjs;if(!i)return;const s=i.listeners,n=s.indexOf(e);-1!==n&&s.splice(n,1),s.length>0||(nt.forEach((e=>{delete t[e]})),delete t._chartjs)}function rt(t){const e=new Set;let i,s;for(i=0,s=t.length;i<s;++i)e.add(t[i]);return e.size===s?t:ALine truncated
/*!
* @kurkle/color v0.2.1
* https://github.com/kurkle/color#readme
* (c) 2022 Jukka Kurkela
* Released under the MIT License
*/function bt(t){return t+.5|0}const xt=(t,e,i)=>Math.max(Math.min(t,i),e);function _t(t){return xt(bt(2.55*t),0,255)}function yt(t){return xt(bt(255*t),0,255)}function vt(t){return xt(bt(t/2.55)/100,0,1)}function wt(t){return xt(bt(100*t),0,100)}const Mt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},kt=[..."0123456789ABCDEF"],St=t=>kt[15&t],Pt=t=>kt[(240&t)>>4]+kt[15&t],Dt=t=>(240&t)>>4==(15&t);function Ot(t){var e=(t=>Dt(t.r)&&Dt(t.g)&&Dt(t.b)&&Dt(t.a))(t)?St:Pt;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const Ct=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function At(t,e,i){const s=e*Math.min(i,1-i),n=(e,n=(e+t/30)%12)=>i-s*Math.max(Math.min(n-3,9-n,1),-1);return[n(0),n(8),n(4)]}function Tt(t,e,i){const s=(s,n=(s+t/60)%6)=>i-i*e*Math.max(Math.min(n,4-n,1),0);return[s(5),s(3),s(1)]}function Lt(t,e,i){const s=At(t,1,.5);let n;for(e+i>1&&(n=1/(e+i),e*=n,i*=n),n=0;n<3;n++)s[n]*=1-e-i,s[n]+=e;return s}function Et(t){const e=t.r/255,i=t.g/255,s=t.b/255,n=Math.max(e,i,s),o=Math.min(e,i,s),a=(n+o)/2;let r,l,h;return n!==o&&(h=n-o,l=a>.5?h/(2-n-o):h/(n+o),r=function(t,e,i,s,n){return t===n?(e-i)/s+(e<i?6:0):e===n?(i-t)/s+2:(t-e)/s+4}(e,i,s,h,n),r=60*r+.5),[0|r,l||0,a]}function Rt(t,e,i,s){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,s)).map(yt)}function It(t,e,i){return Rt(At,t,e,i)}function zt(t){return(t%360+360)%360}function Ft(t){const e=Ct.exec(t);let i,s=255;if(!e)return;e[5]!==i&&(s=e[6]?_t(+e[5]):yt(+e[5]));const n=zt(+e[2]),o=+e[3]/100,a=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return Rt(Lt,t,e,i)}(n,o,a):"hsv"===e[1]?function(t,e,i){return Rt(Tt,t,e,i)}(n,o,a):It(n,o,a),{r:i[0],g:i[1],b:i[2],a:s}}const Vt={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Bt={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let Nt;function Wt(t){Nt||(Nt=function(){const t={},e=Object.keys(Bt),i=Object.keys(Vt);let s,n,o,a,r;for(s=0;s<e.length;s++){for(a=r=e[s],n=0;n<i.length;n++)o=i[n],r=r.replace(o,Vt[o]);o=parseInt(Bt[a],16),t[r]=[o>>16&255,o>>8&255,255&o]}return t}(),Nt.transparent=[0,0,0,0]);const e=Nt[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const jt=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const Ht=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,$t=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Yt(t,e,i){if(t){let s=Et(t);s[e]=Math.max(0,Math.min(s[e]+s[e]*i,0===e?360:1)),Line truncated
+541
View File
@@ -0,0 +1,541 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>WhatWeight 1.3.9</title>
<script src="chart.min.js"></script>
<style>
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
--bg: #f8fafc; --card: #ffffff; --text: #1e293b; --sub: #64748b;
--primary: #3b82f6; --accent: #A0F6B1;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #14171a;
--card: #1f2329;
--text: #ffffff;
--sub: #8e99a3;
--primary: #A0F6B1; /* Твой цвет мятной иконки */
--success: #4ade80; /* Зеленый для тренда */
--danger: #f87171; /* Красный для тренда */
}
}
/* Контейнер для ВСЕЙ карточки графика */
.chart-container-fixed {
display: flex; /* Важно: выстраивает шкалу и график в ряд */
position: relative;
height: 240px;
background: var(--card);
border-radius: 12px;
overflow: hidden;
border: 1px solid rgba(128,128,128,0.1);
}
/* Фиксированная левая шкала */
.y-axis-fixed {
width: 50px;
height: 100%;
background: var(--card);
z-index: 10;
flex-shrink: 0; /* Не дает шкале сжиматься */
}
/* Область прокрутки для графика */
.scroll-container {
flex-grow: 1; /* Занимает всё оставшееся место справа от шкалы */
overflow-x: auto;
overflow-y: hidden;
-webkit-overflow-scrolling: touch;
display: block;
}
/* Обертка внутри прокрутки (её ширину мы меняем в JS) */
#wWrapper {
height: 100%;
position: relative;
}
/* Стили для второго графика (замеры) */
.chart-wrapper {
height: 200px;
width: 100%;
position: relative;
}
body {
opacity: 0; /* Делаем страницу полностью прозрачной */
transition: opacity 0.3s ease-in; /* Плавное появление */
}
body.loaded {
opacity: 1; /* Показываем, когда добавим класс loaded */
}
body { background: var(--bg); color: var(--text); font-family: system-ui, sans-serif; margin: 0; padding: 12px; }
.card { background: var(--card); border-radius: 24px; padding: 18px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); margin-bottom: 15px; }
h2 { font-size: 10px; text-transform: uppercase; color: var(--sub); margin: 0 0 15px 0; letter-spacing: 1.5px; display: flex; justify-content: space-between; align-items: center; }
input, select {
width: 100%; height: 48px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.08);
background: rgba(0,0,0,0.2); color: var(--text); font-size: 16px; font-weight: 600; text-align: center; outline: none; margin-bottom: 10px;
}
input:focus { border-color: var(--primary); }
input.invalid { border-color: var(--danger); color: var(--danger); }
.goals { display: flex; gap: 8px; margin-bottom: 15px; }
.goal-btn { flex: 1; height: 40px; border-radius: 12px; border: 1px solid var(--primary); background: transparent; color: var(--sub); font-size: 9px; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.goal-btn.active { background: var(--primary); color: #0d1117; }
.btn-main { width: 100%; height: 54px; border-radius: 16px; border: none; background: var(--primary); color: #0d1117; font-weight: 900; font-size: 16px; margin-top: 10px; cursor: pointer; }
.scroll-container { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hist-item { padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); display: flex; align-items: center; justify-content: space-between; }
.hist-val { font-size: 18px; font-weight: 900; color: var(--primary); }
.detail-tag { font-size: 10px; background: rgba(160, 246, 177, 0.05); color: var(--primary); padding: 4px 8px; border-radius: 8px; margin-right: 5px; border: 1px solid rgba(160, 246, 177, 0.1); }
.del-btn { background: rgba(248, 113, 113, 0.1); color: var(--danger); border: none; width: 44px; height: 44px; border-radius: 14px; font-size: 28px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
summary { font-size: 11px; color: var(--primary); font-weight: 800; padding: 12px; text-align: center; border: 1px solid rgba(160, 246, 177, 0.2); border-radius: 14px; margin-bottom: 10px; cursor: pointer; }
.app-icon { width: 48px; height: 48px; background: color:var(--primary); border: 2px solid var(--primary); border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-right: 12px; }
/* Красивые кнопки для экспорта/импорта */
.data-btn {
flex: 1;
padding: 12px;
border: none;
border-radius: 16px;
background: var(--bg); /* Цвет фона приложения */
color: var(--text);
font-size: 14px;
font-weight: bold;
cursor: pointer;
transition: all 0.2s;
border: 1px solid rgba(128,128,128,0.1);
}
.data-btn:active {
transform: scale(0.95);
background: var(--primary);
color: #000;
}
</style>
</head>
<body>
<header style="display: flex; align-items: center; margin: 10px 0 20px 5px;">
<div class="app-icon"> ️
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24">
<g transform="translate(5.04 5.04) scale(0.58)">
<path
fill="var(--primary)"
d="M24,4c0,0.55 -0.45,1 -1,1h-1v1c0,0.55 -0.45,1 -1,1s-1,-0.45 -1,-1V5h-1c-0.55,0 -1,-0.45 -1,-1c0,-0.55 0.45,-1 1,-1h1V2c0,-0.55 0.45,-1 1,-1s1,0.45 1,1v1h1C23.55,3 24,3.45 24,4zM21.52,8.95C21.83,9.91 22,10.94 22,12c0,5.52 -4.48,10 -10,10S2,17.52 2,12C2,6.48 6.48,2 12,2c1.5,0 2.92,0.34 4.2,0.94C16.08,3.27 16,3.62 16,4c0,1.35 0.9,2.5 2.13,2.87C18.5,8.1 19.65,9 21,9C21.18,9 21.35,8.98 21.52,8.95zM7,9.5C7,10.33 7.67,11 8.5,11S10,10.33 10,9.5S9.33,8 8.5,8S7,8.67 7,9.5zM16.31,14H7.69c-0.38,0 -0.63,0.42 -0.44,0.75C8.2,16.39 9.97,17.5 12,17.5s3.8,-1.11 4.75,-2.75C16.94,14.42 16.7,14 16.31,14zM17,9.5C17,8.67 16.33,8 15.5,8S14,8.67 14,9.5s0.67,1.5 1.5,1.5S17,10.33 17,9.5z"/>
</g>
</svg>
</div>
<b style="font-size: 20px; flex-grow: 1;" ><span style="color:var(--primary)">[ </span><span data-i18n="title-app">What-Weight</span><span style="color:var(--primary)"> ]</span></b>
<div id="trendDisplay" style="font-size: 10px; font-weight: 900; color: var(--sub);">...</div>
</header>
<div class="card">
<h2 data-i18n="card-input-title">Goal & Input</h2>
<div class="goals">
<div onclick="setGoal('keep')" id="g-keep" class="goal-btn" data-i18n="goal-keep">MAINTAIN</div>
<div onclick="setGoal('lose')" id="g-lose" class="goal-btn" data-i18n="goal-lose">LOSE</div>
<div onclick="setGoal('gain')" id="g-gain" class="goal-btn" data-i18n="goal-gain">GAIN</div>
</div>
<div style="display:grid; grid-template-columns: 1fr 1fr; gap: 10px;">
<input type="number" id="targetWeight" data-i18n="placeholder-target" placeholder="Target kg" step="0.1">
<input type="number" id="wVal" data-i18n="placeholder-weight" placeholder="Weight kg" step="0.1" inputmode="decimal" oninput="validate(this, 30, 250)">
</div>
<input type="date" id="wDate">
<details>
<summary >📏 <span data-i18n="measurements-title">BODY MEASUREMENTS</span></summary>
<div style="display:grid; grid-template-columns: 1fr 1fr; gap: 10px;">
<input type="number" id="mWaist" data-i18n="placeholder-waist" placeholder="Waist" step="0.1" oninput="validate(this, 30, 180)">
<input type="number" id="mChest" data-i18n="placeholder-chest" placeholder="Chest" step="0.1" oninput="validate(this, 30, 180)">
<input type="number" id="mHips" data-i18n="placeholder-hips" placeholder="Hips" step="0.1" oninput="validate(this, 30, 180)">
<input type="number" id="mBicep" data-i18n="placeholder-bicep" placeholder="Bicep" step="0.1" oninput="validate(this, 10, 80)">
</div>
</details>
<button onclick="handleSaveClick()" class="btn-main" data-i18n="btn-save" id="saveBtn">SAVE</button>
</div>
<div class="card">
<h2 data-i18n="chart-weight-title">Weight Dynamics</h2>
<div class="chart-container-fixed">
<canvas id="weightAxis" class="y-axis-fixed"></canvas>
<div id="wScroll" class="scroll-container">
<div id="wWrapper">
<canvas id="weightChart"></canvas>
</div>
</div>
</div>
</div>
<div class="card">
<h2><span data-i18n="chart-measures-title">Measurements</span>
<select id="measureType" style="height:26px; font-size:10px; width:auto; border-radius:8px; margin:0; border:none; background:transparent; color:var(--primary);" onchange="renderUI()">
<option value="waist" data-i18n="placeholder-waist">Waist</option>
<option value="chest" data-i18n="placeholder-chest">Chest</option>
<option value="hips" data-i18n="placeholder-hips">Hips</option>
<option value="bicep" data-i18n="placeholder-bicep">Bicep</option>
</select>
</h2>
<div class="chart-wrapper"><canvas id="measureChart"></canvas></div>
</div>
<div class="card" id="histBox" style="display:none">
<h2 data-i18n="history-title">History</h2>
<div id="log"></div>
</div>
<div class="card" style="margin-top: 20px;">
<h3 style="margin-top:0; margin-bottom: 15px; font-size: 16px; text-align: center;">Данные</h3>
<div style="display: flex; gap: 10px;">
<button onclick="exportToCSV()" class="data-btn">📤 Экспорт</button>
<button onclick="showImportModal()" class="data-btn">📥 Импорт</button>
</div>
</div>
<div id="importModal" style="display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.8); z-index:10000; padding:20px;">
<div class="card" style="height:100%; display:flex; flex-direction:column;">
<h3 style="margin-top:0">Вставьте содержимое CSV</h3>
<textarea id="csvPasteArea" style="flex:1; width:100%; background:var(--bg); color:var(--text); border:1px solid var(--sub); border-radius:12px; padding:10px; font-family:monospace; font-size:12px;"></textarea>
<div style="display:flex; gap:10px; margin-top:15px;">
<button onclick="processPastedCSV()" class="data-btn" style="background:var(--primary); color:#000;">Загрузить</button>
<button onclick="document.getElementById('importModal').style.display='none'" class="data-btn">Отмена</button>
</div>
</div>
</div>
<script>
let db = JSON.parse(localStorage.getItem('weight_tracker_data') || '{"entries":[], "config":{"goal":"keep", "target":0}}');
let wChart, mChart, wAxisChart; // Добавили wAxisChart
let confirmMode = false;
let translations = {}; // Будет заполнено через initLanguage
async function initLanguage() {
let lang = 'ru';
if (window.Android && window.Android.getLanguage) {
const fullLang = window.Android.getLanguage();
lang = fullLang.startsWith('ru') ? 'ru' : 'en';
}
try {
if (window.Android && window.Android.getTranslations) {
const jsonString = window.Android.getTranslations(lang);
translations = JSON.parse(jsonString);
document.querySelectorAll('[data-i18n]').forEach(el => {
const key = el.getAttribute('data-i18n');
if (translations[key]) {
if (el.tagName === 'INPUT') el.placeholder = translations[key];
else el.textContent = translations[key];
}
});
renderUI();
}
} catch (e) { console.error("Language Error:", e); }
}
function saveDB() { localStorage.setItem('weight_tracker_data', JSON.stringify(db)); }
function renderUI() {
if (!document.getElementById('wDate').value) document.getElementById('wDate').value = new Date().toISOString().split('T')[0];
document.querySelectorAll('.goal-btn').forEach(b => b.classList.remove('active'));
if(document.getElementById('g-' + db.config.goal)) document.getElementById('g-' + db.config.goal).classList.add('active');
document.getElementById('targetWeight').value = db.config.target || '';
const log = document.getElementById('log');
if (db.entries.length > 0) {
document.getElementById('histBox').style.display = 'block';
log.innerHTML = db.entries.slice().reverse().map(e => `
<div class="hist-item">
<div>
<div style="font-size:11px; font-weight:bold; color:var(--sub)">${e.date.split('-').reverse().join('.')}</div>
<div class="hist-val">${e.weight || '?'} кг</div>
<div style="margin-top:4px">
${['waist','chest','hips','bicep'].map(f => e[f] ? `<span class="detail-tag">${translations[f] || f}: ${e[f]}</span>` : '').join('')}
</div>
</div>
<button class="del-btn" onclick="manualDelete('${e.date}')">×</button>
</div>`).join('');
} else { document.getElementById('histBox').style.display = 'none'; }
updateTrendDisplay();
drawCharts();
document.body.classList.add('loaded');
}
function drawCharts() {
const weights = db.entries
.filter(e => e.weight)
.sort((a, b) => new Date(a.date) - new Date(b.date));
if (weights.length === 0) return;
const scrollContainer = document.getElementById('wScroll');
const wWrapper = document.getElementById('wWrapper');
const axisCanvas = document.getElementById('weightAxis');
const chartCanvas = document.getElementById('weightChart');
const style = getComputedStyle(document.body);
const primaryColor = style.getPropertyValue('--primary').trim();
const textColor = style.getPropertyValue('--text').trim();
const subColor = style.getPropertyValue('--sub').trim();
// Цвета из твоей рабочей логики
const trendDown = '#4ade80'; // Зеленый (хорошо)
const trendUp = '#f87171'; // Красный (плохо)
const mintColor = primaryColor;
// --- ТВОЯ РАБОЧАЯ ЛОГИКА ЦВЕТОВ ---
const pointColors = weights.map((e, idx) => {
const target = db.config.target || 0;
// 1. Режим УДЕРЖАНИЕ (keep)
if (db.config.goal === 'keep' && target > 0) {
const diff = Math.abs(e.weight - target);
return diff > 0.4 ? trendUp : trendDown;
}
// Для режимов Снижение и Набор сравниваем с предыдущим днем
if (idx === 0) return trendDown;
const dailyDiff = e.weight - weights[idx - 1].weight;
// 2. Режим СНИЖЕНИЕ (lose)
if (db.config.goal === 'lose') {
return dailyDiff <= 0 ? trendDown : trendUp;
}
// 3. Режим НАБОР (gain)
if (db.config.goal === 'gain') {
return dailyDiff >= 0 ? trendDown : trendUp;
}
return mintColor;
});
// Расчет границ шкалы (строго целые числа)
const targetVal = parseFloat(db.config.target) || 0;
const allValues = weights.map(e => e.weight);
if (targetVal > 0) allValues.push(targetVal);
const minW = Math.floor(Math.min(...allValues) - 1);
const maxW = Math.ceil(Math.max(...allValues) + 1);
const commonYAxis = {
min: minW, max: maxW,
grid: { display: false, drawBorder: false },
ticks: { color: subColor, font: { size: 11, weight: 'bold' }, stepSize: 1, precision: 0, padding: 5 }
};
if (wAxisChart) wAxisChart.destroy();
if (wChart) wChart.destroy();
// Левая шкала (вертикальная)
axisCanvas.width = 40;
axisCanvas.height = 240;
wAxisChart = new Chart(axisCanvas.getContext('2d'), {
type: 'line',
data: { labels: weights.map(e => e.date), datasets: [{ data: weights.map(e => e.weight), showLine: false, pointRadius: 0 }] },
options: {
responsive: false, maintainAspectRatio: false,
layout: { padding: { top: 40, bottom: 0 } },
plugins: { legend: { display: false }, tooltip: { enabled: false } },
scales: {
y: { ...commonYAxis, display: true, position: 'left', afterFit: (axis) => { axis.width = 40; } },
x: { display: true, ticks: { display: false }, grid: { display: false }, afterFit: (axis) => { axis.height = 30; } }
}
}
});
// Основной график
const chartWidth = Math.max(weights.length * 60, scrollContainer.clientWidth);
wWrapper.style.width = chartWidth + 'px';
chartCanvas.height = 240;
wChart = new Chart(chartCanvas.getContext('2d'), {
type: 'line',
data: {
labels: weights.map(e => e.date.split('-').reverse().join('.').substring(0, 5)),
datasets: [{
data: weights.map(e => e.weight),
borderColor: primaryColor,
borderWidth: 1,
tension: 0.3,
fill: true,
backgroundColor: primaryColor + '45',
pointRadius: 6,
pointBackgroundColor: pointColors, // Применяем рассчитанные цвета
pointBorderColor: primaryColor,
pointBorderWidth: 2
}]
},
options: {
responsive: true, maintainAspectRatio: false,
layout: { padding: { top: 40, bottom: 0, right: 20 } },
plugins: { legend: { display: false } },
scales: {
y: { ...commonYAxis, ticks: { display: false }, afterFit: (axis) => { axis.width = 0; } },
x: { grid: { display: false }, ticks: { color: subColor, font: { size: 10 }, maxRotation: 0 }, afterFit: (axis) => { axis.height = 30; } }
}
},
plugins: [{
afterDatasetsDraw: (chart) => {
const { ctx, chartArea: { right }, scales: { y } } = chart;
ctx.save();
ctx.textAlign = 'center';
ctx.font = 'bold 11px sans-serif';
ctx.fillStyle = textColor;
chart.getDatasetMeta(0).data.forEach((point, index) => {
const val = chart.data.datasets[0].data[index];
if (val) ctx.fillText(val, point.x, point.y - 12);
});
if (targetVal > 0) {
const yPos = y.getPixelForValue(targetVal);
ctx.beginPath();
ctx.setLineDash([5, 5]);
ctx.strokeStyle = primaryColor + '66';
ctx.lineWidth = 1.5;
ctx.moveTo(0, yPos); ctx.lineTo(right, yPos);
ctx.stroke();
}
ctx.restore();
}
}]
});
setTimeout(() => { scrollContainer.scrollLeft = 99999; }, 50);
// Отрисовка замеров (если функция есть)
if (typeof renderMeasuresChart === 'function') renderMeasuresChart();
}
function renderMeasuresChart() {
const mType = document.getElementById('measureType').value;
const measures = db.entries.filter(e => e[mType]);
const mCtx = document.getElementById('measureChart').getContext('2d');
if (mChart) mChart.destroy();
if (measures.length > 0) {
mChart = new Chart(mCtx, {
type: 'line',
data: {
labels: measures.map(e => e.date.split('-').reverse().join('.').substring(0,5)),
datasets: [{ data: measures.map(e => e[mType]), borderColor: '#A0F6B1', tension: 0.4, pointRadius: 4 }]
},
options: { responsive: true, maintainAspectRatio: false, animation: false, plugins: { legend: { display: false } } }
});
}
}
// Вспомогательные функции
function updateTrendDisplay() {
const entries = db.entries.filter(e => e.weight);
const el = document.getElementById('trendDisplay');
if (entries.length < 2) { el.innerText = translations['trend-analysis'] || "..."; return; }
const last = entries[entries.length - 1];
const avg = entries.slice(-8, -1).reduce((s, e) => s + e.weight, 0) / Math.max(1, entries.slice(-8, -1).length);
const diff = last.weight - avg;
if (Math.abs(diff) < 0.1) { el.innerText = translations['trend-stable']; el.style.color = "var(--sub)"; }
else if (diff > 0) { el.innerText = translations['trend-up']; el.style.color = "#f87171"; }
else { el.innerText = translations['trend-down']; el.style.color = "#4ade80"; }
}
window.manualDelete = function(date) { db.entries = db.entries.filter(e => e.date !== date); saveDB(); renderUI(); };
function setGoal(g) { db.config.goal = g; saveDB(); renderUI(); }
function handleSaveClick() {
const date = document.getElementById('wDate').value;
if (!date) return;
db.config.target = parseFloat(document.getElementById('targetWeight').value) || 0;
let entry = db.entries.find(e => e.date === date) || { date };
if (document.getElementById('wVal').value) entry.weight = parseFloat(document.getElementById('wVal').value);
['waist', 'chest', 'hips', 'bicep'].forEach(f => {
let v = document.getElementById('m' + f.charAt(0).toUpperCase() + f.slice(1)).value;
if (v) entry[f] = parseFloat(v);
});
if (!db.entries.find(e => e.date === date)) db.entries.push(entry);
db.entries.sort((a, b) => new Date(a.date) - new Date(b.date));
saveDB(); renderUI();
}
function exportToCSV() {
if (!db.entries || db.entries.length === 0) return;
let csvContent = "date,weight,waist,chest,hips,bicep\n";
db.entries.forEach(e => {
csvContent += `${e.date},${e.weight || ''},${e.waist || ''},${e.chest || ''},${e.hips || ''},${e.bicep || ''}\n`;
});
// Проверяем, запущено ли в Android приложении
if (window.Android && window.Android.exportCSV) {
window.Android.exportCSV(csvContent, `weight_data_${new Date().toISOString().split('T')[0]}.csv`);
} else {
// Обычный браузерный способ (для тестов)
const blob = new Blob([csvContent], { type: 'text/csv' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = 'data.csv';
a.click();
}
}
// ИМПОРТ
function showImportModal() {
document.getElementById('importModal').style.display = 'block';
document.getElementById('csvPasteArea').value = '';
}
function processPastedCSV() {
const text = document.getElementById('csvPasteArea').value;
if (!text.trim()) return;
try {
const lines = text.split(/\r?\n/);
const dataLines = lines.slice(1); // Пропускаем заголовок (date,weight...)
let count = 0;
dataLines.forEach(line => {
if (!line.trim()) return;
const [date, weight, waist, chest, hips, bicep] = line.split(',');
if (!date || date.length < 8) return; // Проверка на корректность даты
let entry = db.entries.find(item => item.date === date);
if (!entry) {
entry = { date };
db.entries.push(entry);
}
if (weight && !isNaN(weight)) entry.weight = parseFloat(weight);
if (waist && !isNaN(waist)) entry.waist = parseFloat(waist);
if (chest && !isNaN(chest)) entry.chest = parseFloat(chest);
if (hips && !isNaN(hips)) entry.hips = parseFloat(hips);
if (bicep && !isNaN(bicep)) entry.bicep = parseFloat(bicep);
count++;
});
db.entries.sort((a, b) => new Date(a.date) - new Date(b.date));
saveDB();
renderUI();
document.getElementById('importModal').style.display = 'none';
alert("Успешно загружено записей: " + count);
} catch (err) {
alert("Ошибка формата: проверьте, что вы скопировали CSV целиком");
console.error(err);
}
}
window.onload = initLanguage;
</script>
</body>
</html>
+29
View File
@@ -0,0 +1,29 @@
{
"title-app": "Body Tune",
"card-input-title": "Goal & Input",
"goal-keep": "MAINTAIN",
"goal-lose": "LOSE",
"goal-gain": "GAIN",
"placeholder-target": "Target kg",
"placeholder-weight": "Weight kg",
"measurements-title": "BODY MEASUREMENTS",
"placeholder-waist": "Waist",
"placeholder-chest": "Chest",
"placeholder-hips": "Hips",
"placeholder-bicep": "Bicep",
"btn-save": "SAVE",
"btn-save-confirm": "ARE YOU SURE?",
"btn-save-done": "DONE!",
"chart-weight-title": "Weight Dynamics",
"chart-measures-title": "Measurements",
"history-title": "History",
"btn-backup": "EXPORT / IMPORT",
"trend-stable": "STABLE",
"trend-up": "INCREASING ↑",
"trend-down": "DECREASING ↓",
"trend-analysis": "ANALYZING...",
"waist": "Waist",
"chest": "Chest",
"hips": "Hips",
"bicep": "Bicep"а
}
+29
View File
@@ -0,0 +1,29 @@
{
"title-app": "Тюнинг тела",
"card-input-title": "Цель и ввод",
"goal-keep": "ПОДДЕРЖКА",
"goal-lose": "СБРОС",
"goal-gain": "НАБОР",
"placeholder-target": "Цель кг",
"placeholder-weight": "Вес кг",
"measurements-title": "ЗАМЕРЫ ТЕЛА",
"placeholder-waist": "Талия",
"placeholder-chest": "Грудь",
"placeholder-hips": "Бедра",
"placeholder-bicep": "Бицепс",
"btn-save": "СОХРАНИТЬ",
"btn-save-confirm": "ТОЧНО ВЕРНО?",
"btn-save-done": "ГОТОВО!",
"chart-weight-title": "Динамика веса",
"chart-measures-title": "Замеры",
"history-title": "История",
"btn-backup": "ЭКСПОРТ / ИМПОРТ",
"trend-stable": "СТАБИЛЬНО",
"trend-up": "ПОВЫШЕНИЕ ↑",
"trend-down": "СНИЖЕНИЕ ↓",
"trend-analysis": "АНАЛИЗ...",
"waist": "Талия",
"chest": "Грудь",
"hips": "Бедра",
"bicep": "Бицепс"
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

@@ -0,0 +1,68 @@
package pictures.tristagram.lina.bodytune;
import android.graphics.Color;
import android.net.Uri;
import android.os.Bundle;
import android.webkit.ValueCallback;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// WindowCompat.setDecorFitsSystemWindows(getWindow(), false);
getWindow().setStatusBarColor(Color.TRANSPARENT);
WebView webView = new WebView(this);
// В Activity:
webView.addJavascriptInterface(new WebAppInterface(this), "Android");
setContentView(webView);
// 2. Сдвигаем контент вниз на высоту системной панели
ViewCompat.setOnApplyWindowInsetsListener(webView, (v, windowInsets) -> {
Insets insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars());
v.setPadding(0, insets.top, 0, 0);
return windowInsets;
});
WebSettings settings = webView.getSettings();
settings.setJavaScriptEnabled(true);
settings.setDomStorageEnabled(true); // Для сохранения веса в памяти
settings.setAllowFileAccess(true);
settings.setAllowContentAccess(true);
settings.setAllowFileAccessFromFileURLs(true);
settings.setAllowUniversalAccessFromFileURLs(true);
settings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
// Поддержка темной темы на уровне WebView
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.Q) {
settings.setForceDark(WebSettings.FORCE_DARK_AUTO);
}
webView.setWebViewClient(new WebViewClient());
webView.setWebChromeClient(new WebChromeClient() {
// Этот метод открывает системный выбор файла
@Override
public boolean onShowFileChooser(WebView webView, ValueCallback<Uri[]> filePathCallback, FileChooserParams fileChooserParams) {
// Здесь нужен код для открытия Intent.ACTION_GET_CONTENT
// Для простоты: импорт лучше сделать через текстовое поле (вставить текст из CSV)
// или использовать полноценный FileChooser.
return true;
}
});
webView.loadUrl("file:///android_asset/index.html");
}
}
@@ -0,0 +1,66 @@
package pictures.tristagram.lina.bodytune;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.webkit.JavascriptInterface;
import androidx.core.content.FileProvider;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
public class WebAppInterface {
private final Context mContext;
WebAppInterface(Context context) {
mContext = context;
}
@JavascriptInterface
public void exportCSV(String data, String fileName) {
try {
// Создаем временный файл
File cachePath = new File(mContext.getCacheDir(), "exports");
cachePath.mkdirs();
File newFile = new File(cachePath, fileName);
FileOutputStream stream = new FileOutputStream(newFile);
stream.write(data.getBytes(StandardCharsets.UTF_8));
stream.close();
// Открываем диалог "Поделиться"
Uri contentUri = FileProvider.getUriForFile(mContext, mContext.getPackageName() + ".fileprovider", newFile);
if (contentUri != null) {
Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
shareIntent.setDataAndType(contentUri, "text/csv");
shareIntent.putExtra(Intent.EXTRA_STREAM, contentUri);
mContext.startActivity(Intent.createChooser(shareIntent, "Сохранить отчет"));
}
} catch (IOException e) {
e.printStackTrace();
}
}
@JavascriptInterface
public String getLanguage() {
return java.util.Locale.getDefault().getLanguage();
}
@JavascriptInterface
public String getTranslations(String lang) {
try {
InputStream is = mContext.getAssets().open("locales/" + lang + ".json");
byte[] buffer = new byte[is.available()];
is.read(buffer);
is.close();
return new String(buffer, StandardCharsets.UTF_8);
} catch (Exception ex) {
return "{}";
}
}
}
@@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>
@@ -0,0 +1,15 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="#A0F6B1">
<group android:scaleX="0.58"
android:scaleY="0.58"
android:translateX="5.04"
android:translateY="5.04">
<path
android:fillColor="@android:color/white"
android:pathData="M24,4c0,0.55 -0.45,1 -1,1h-1v1c0,0.55 -0.45,1 -1,1s-1,-0.45 -1,-1V5h-1c-0.55,0 -1,-0.45 -1,-1c0,-0.55 0.45,-1 1,-1h1V2c0,-0.55 0.45,-1 1,-1s1,0.45 1,1v1h1C23.55,3 24,3.45 24,4zM21.52,8.95C21.83,9.91 22,10.94 22,12c0,5.52 -4.48,10 -10,10S2,17.52 2,12C2,6.48 6.48,2 12,2c1.5,0 2.92,0.34 4.2,0.94C16.08,3.27 16,3.62 16,4c0,1.35 0.9,2.5 2.13,2.87C18.5,8.1 19.65,9 21,9C21.18,9 21.35,8.98 21.52,8.95zM7,9.5C7,10.33 7.67,11 8.5,11S10,10.33 10,9.5S9.33,8 8.5,8S7,8.67 7,9.5zM16.31,14H7.69c-0.38,0 -0.63,0.42 -0.44,0.75C8.2,16.39 9.97,17.5 12,17.5s3.8,-1.11 4.75,-2.75C16.94,14.42 16.7,14 16.31,14zM17,9.5C17,8.67 16.33,8 15.5,8S14,8.67 14,9.5s0.67,1.5 1.5,1.5S17,10.33 17,9.5z"/>
</group>
</vector>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/webview"
android:layout_width="match_parent"
android:layout_height="match_parent" />
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 926 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

+7
View File
@@ -0,0 +1,7 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Base.Theme.AndroidStudio" parent="Theme.Material3.DayNight.NoActionBar">
<!-- Customize your dark theme here. -->
<!-- <item name="colorPrimary">@color/my_dark_primary</item> -->
</style>
</resources>
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Тюнинг тела</string>
</resources>
+5
View File
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
</resources>
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#2A3730</color>
</resources>
+3
View File
@@ -0,0 +1,3 @@
<resources>
<string name="app_name">Body Fit</string>
</resources>
+14
View File
@@ -0,0 +1,14 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Base.Theme.AndroidStudio" parent="Theme.Material3.DayNight.NoActionBar">
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:windowLightStatusBar">true</item>
<item name="colorPrimary">@android:color/white</item>
<!-- Customize your light theme here. -->
<!-- <item name="colorPrimary">@color/my_light_primary</item> -->
</style>
<style name="Theme.AndroidStudio" parent="Base.Theme.AndroidStudio" />
</resources>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?><!--
Sample backup rules file; uncomment and customize as necessary.
See https://developer.android.com/guide/topics/data/autobackup
for details.
Note: This file is ignored for devices older than API 31
See https://developer.android.com/about/versions/12/backup-restore
-->
<full-backup-content>
<!--
<include domain="sharedpref" path="."/>
<exclude domain="sharedpref" path="device.xml"/>
-->
</full-backup-content>
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?><!--
Sample data extraction rules file; uncomment and customize as necessary.
See https://developer.android.com/about/versions/12/backup-restore#xml-changes
for details.
-->
<data-extraction-rules>
<cloud-backup>
<!-- TODO: Use <include> and <exclude> to control what is backed up.
<include .../>
<exclude .../>
-->
</cloud-backup>
<!--
<device-transfer>
<include .../>
<exclude .../>
</device-transfer>
-->
</data-extraction-rules>
+4
View File
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<paths>
<cache-path name="my_cache" path="exports/" />
</paths>
@@ -0,0 +1,17 @@
package pictures.tristagram.bodytuneup;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}