Skip to content

Commit

Permalink
replace pngs with xml, add scrollbar, improve layouts, add usb button…
Browse files Browse the repository at this point in the history
…, more translated strings
  • Loading branch information
petabyt committed Feb 22, 2024
1 parent 21244a3 commit 013afa3
Show file tree
Hide file tree
Showing 23 changed files with 99 additions and 72 deletions.
11 changes: 0 additions & 11 deletions app/src/main/res/drawable-anydpi/download.xml

This file was deleted.

11 changes: 0 additions & 11 deletions app/src/main/res/drawable-anydpi/share.xml

This file was deleted.

Binary file removed app/src/main/res/drawable-hdpi/download.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-hdpi/share.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-mdpi/download.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-mdpi/share.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-xhdpi/download.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-xhdpi/share.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-xxhdpi/download.png
Binary file not shown.
Binary file removed app/src/main/res/drawable-xxhdpi/share.png
Binary file not shown.
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/baseline_download_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M5,20h14v-2H5V20zM19,9h-4V3H9v6H5l7,7L19,9z"/>
</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/baseline_share_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M18,16.08c-0.76,0 -1.44,0.3 -1.96,0.77L8.91,12.7c0.05,-0.23 0.09,-0.46 0.09,-0.7s-0.04,-0.47 -0.09,-0.7l7.05,-4.11c0.54,0.5 1.25,0.81 2.04,0.81 1.66,0 3,-1.34 3,-3s-1.34,-3 -3,-3 -3,1.34 -3,3c0,0.24 0.04,0.47 0.09,0.7L8.04,9.81C7.5,9.31 6.79,9 6,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3c0.79,0 1.5,-0.31 2.04,-0.81l7.12,4.16c-0.05,0.21 -0.08,0.43 -0.08,0.65 0,1.61 1.31,2.92 2.92,2.92 1.61,0 2.92,-1.31 2.92,-2.92s-1.31,-2.92 -2.92,-2.92z"/>
</vector>
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/go_button2.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke android:width="2dp" android:color="#00000000" />
<solid android:color="#151515" />
<solid android:color="#573E70" />
<padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp" />
</shape>
12 changes: 12 additions & 0 deletions app/src/main/res/drawable/scroll_thumb.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape android:shape="rectangle">
<solid android:color="#ff0" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<solid android:color="#fff" />
</shape>
</item>
</selector>
4 changes: 4 additions & 0 deletions app/src/main/res/drawable/scroll_track.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#80ffffff" />
</shape>
5 changes: 5 additions & 0 deletions app/src/main/res/layout/activity_gallery.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
tools:visibility="visible" />

<androidx.recyclerview.widget.RecyclerView
app:fastScrollEnabled="true"
app:fastScrollVerticalThumbDrawable="@drawable/scroll_thumb"
app:fastScrollVerticalTrackDrawable="@drawable/scroll_track"
app:fastScrollHorizontalThumbDrawable="@drawable/scroll_thumb"
app:fastScrollHorizontalTrackDrawable="@drawable/scroll_track"
android:id="@+id/galleryView"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/res/layout/activity_help.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,24 +106,24 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="false"
android:text="Thanks:"
android:text="@string/help_text11"
android:textAllCaps="false"
android:textSize="20sp" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="\@spaqin for X-S10 packet dumps" />
android:text="@string/help_text12" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="\@mxr_1 for bluetooth work" />
android:text="@string/help_text13" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Beta-testing: \@spaqin, \@matthias, \@nutterbuttersforeveryoneyippeeee" />
android:text="@string/help_test14" />

</LinearLayout>
</ScrollView>
Expand Down
24 changes: 13 additions & 11 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
android:layout_height="match_parent"
tools:context=".MainActivity">

<TextView
android:id="@+id/error_msg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
app:layout_constraintTop_toBottomOf="@+id/boxLayout"
tools:layout_editor_absoluteX="46dp" />

<LinearLayout
android:id="@+id/boxLayout"
android:layout_width="match_parent"
Expand All @@ -25,36 +33,30 @@
style="@style/GoButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Connect to WiFi" />
android:text="@string/connect_to_wifi" />

<Button
style="@style/GoButton"
android:id="@+id/connect_usb"
style="@style/GoButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/go_button2"
android:text="Connect to USB" />
android:text="@string/connect_to_usb" />

<Button
android:id="@+id/plugins"
style="@style/GreyButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Plugins"
android:text="@string/plugins"
android:visibility="visible" />

<Button
android:id="@+id/help_button"
style="@style/GreyButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Help" />

<TextView
android:id="@+id/error_msg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center" />
android:text="@string/help" />

</LinearLayout>

Expand Down
58 changes: 29 additions & 29 deletions app/src/main/res/layout/activity_test.xml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:context=".Tester">

<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >

<Space
android:layout_width="match_parent"
android:layout_height="wrap_content" />

<TextView
android:id="@+id/testerLog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Logs go here" />
</LinearLayout>
</ScrollView>

<?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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:context=".Tester">

<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >

<Space
android:layout_width="match_parent"
android:layout_height="wrap_content" />

<TextView
android:id="@+id/testerLog"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Logs go here" />
</LinearLayout>
</ScrollView>

</androidx.constraintlayout.widget.ConstraintLayout>
3 changes: 1 addition & 2 deletions app/src/main/res/layout/item_image.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
android:id="@+id/imageView"
android:layout_width="100dp"
android:layout_height="100dp"
android:scaleType="centerCrop"
android:src="@drawable/zoomable" />
android:scaleType="centerCrop" />
2 changes: 1 addition & 1 deletion app/src/main/res/layout/popup_download.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="Downloading image..."/>
android:text="@string/downloading_image"/>

<ProgressBar
android:id="@+id/progress_bar"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/menu/viewer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

<item
android:id="@+id/action_download"
android:icon="@drawable/download"
android:icon="@drawable/baseline_download_24"
android:title=""
app:showAsAction="always" />

<item
android:id="@+id/action_share"
android:icon="@drawable/share"
android:icon="@drawable/baseline_share_24"
android:title=""
app:showAsAction="always" />

Expand Down
17 changes: 17 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,21 @@

<string name="url">https://github.com/petabyt/fudge</string>
<string name="motd_thing">Fudge open beta-testing release</string>
<string name="connect_to_usb">Connect to USB</string>
<string name="plugins">Plugins</string>
<string name="help">Help</string>
<string name="connect_to_wifi">Connect to WiFi</string>
<string name="help_text11">Thanks:</string>
<string name="help_text12">\@spaqin for X-S10 packet dumps</string>
<string name="help_text13">\@mxr_1 for bluetooth work</string>
<string name="help_test14">Beta-testing: @spaqin, @matthias, @nutter</string>
<string name="downloading_image">Downloading image...</string>
<string name="connecting">Connecting...</string>
<string name="dimensions">Image size</string>
<string name="filesize">File size</string>
<string name="alreadydownloaded">File is already downloaded</string>
<string name="regressiontesting">Regression Testing</string>
<string name="gallery">Gallery</string>
<string name="getImages2">Maybe you only have RAW files? Fuji doesn\'t let us view RAW over WiFi :(</string>
<string name="noImages1">No images available on camera.</string>
</resources>

0 comments on commit 013afa3

Please sign in to comment.