Initial
This commit is contained in:
26
create_placeholders.py
Normal file
26
create_placeholders.py
Normal file
@@ -0,0 +1,26 @@
|
||||
import os
|
||||
|
||||
base_path = r's:\Source\Android\DaydreamClock\app\src\main\res\drawable'
|
||||
names = [f'num_{i}' for i in range(10)] + ['num_colon']
|
||||
|
||||
xml_content = """<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="100dp"
|
||||
android:height="100dp"
|
||||
android:viewportWidth="100"
|
||||
android:viewportHeight="100">
|
||||
<path
|
||||
android:fillColor="#FF0000"
|
||||
android:pathData="M50,50m-40,0a40,40 0 1,1 80,0a40,40 0 1,1 -80,0"/>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M30,30l40,40m-40,0l40,-40"
|
||||
android:strokeWidth="5"
|
||||
android:strokeColor="#FFFFFF"/>
|
||||
</vector>
|
||||
"""
|
||||
|
||||
for name in names:
|
||||
file_path = os.path.join(base_path, f"{name}.xml")
|
||||
with open(file_path, 'w') as f:
|
||||
f.write(xml_content.replace("num_placeholder", name))
|
||||
print(f"Created {file_path}")
|
||||
Reference in New Issue
Block a user