-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add icons for gps and gsm signal strength to info sheet
- Loading branch information
1 parent
6d52a1e
commit fb5f362
Showing
12 changed files
with
171 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package de.raffaelhahn.xadgps_client; | ||
|
||
public class Utils { | ||
|
||
public static int getGpsIcon(int gpsSignal) { | ||
return gpsSignal >= 5 ? R.drawable.satellite_strong : R.drawable.satellite_weak; | ||
} | ||
|
||
public static int getGsmIcon(int gsmSignal) { | ||
if(gsmSignal >= 24) { | ||
return R.drawable.signal4; | ||
} else if(gsmSignal >= 21) { | ||
return R.drawable.signal3; | ||
} else if(gsmSignal >= 18) { | ||
return R.drawable.signal2; | ||
} else if(gsmSignal >= 15) { | ||
return R.drawable.signal1; | ||
} else { | ||
return R.drawable.signal0; | ||
} | ||
} | ||
|
||
public static int getGpsHint(int gpsSignal) { | ||
if (gpsSignal >= 5) { | ||
return R.string.signal_strength_strong; | ||
} else { | ||
return R.string.signal_strength_weak; | ||
} | ||
} | ||
|
||
public static int getGsmHint(int gsmSignal) { | ||
if (gsmSignal >= 21) { | ||
return R.string.signal_strength_strong; | ||
} else if (gsmSignal >= 15) { | ||
return R.string.signal_strength_normal; | ||
} else { | ||
return R.string.signal_strength_weak; | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<vector android:height="24dp" android:tint="#000000" | ||
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="M15.44,0.59l-3.18,3.18c-0.78,0.78 -0.78,2.05 0,2.83l1.24,1.24l-0.71,0.71L11.55,7.3c-0.78,-0.78 -2.05,-0.78 -2.83,0L7.3,8.72c-0.78,0.78 -0.78,2.05 0,2.83l1.24,1.24l-0.71,0.71L6.6,12.25c-0.78,-0.78 -2.05,-0.78 -2.83,0l-3.18,3.18c-0.78,0.78 -0.78,2.05 0,2.83l3.54,3.54c0.78,0.78 2.05,0.78 2.83,0l3.18,-3.18c0.78,-0.78 0.78,-2.05 0,-2.83l-1.24,-1.24l0.71,-0.71l1.24,1.24c0.78,0.78 2.05,0.78 2.83,0l1.41,-1.41c0.78,-0.78 0.78,-2.05 0,-2.83L13.84,9.6l0.71,-0.71l1.24,1.24c0.78,0.78 2.05,0.78 2.83,0l3.18,-3.18c0.78,-0.78 0.78,-2.05 0,-2.83l-3.54,-3.54C17.48,-0.2 16.22,-0.2 15.44,0.59zM6.6,19.32l-1.06,1.06L2,16.85l1.06,-1.06L6.6,19.32zM8.72,17.2l-1.06,1.06l-3.54,-3.54l1.06,-1.06L8.72,17.2zM18.26,7.66L17.2,8.72l-3.54,-3.54l1.06,-1.06L18.26,7.66zM20.38,5.54L19.32,6.6l-3.54,-3.54L16.85,2L20.38,5.54zM14,21l0,2c4.97,0 9,-4.03 9,-9l-2,0C21,17.87 17.87,21 14,21zM14,17l0,2c2.76,0 5,-2.24 5,-5l-2,0C17,15.66 15.66,17 14,17z"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="960dp" | ||
android:height="960dp" | ||
android:viewportWidth="960" | ||
android:viewportHeight="960"> | ||
<path | ||
android:fillColor="#FF000000" | ||
android:pathData="M774,272L816,230L674,88L632,130L774,272ZM689,357L731,315L589,173L547,215L689,357ZM307,739L349,697L207,555L165,597L307,739ZM222,824L264,782L122,640L80,682L222,824ZM222,903C212,903 202,901 192,897C182,893 173,887.33 165,880L23,738C15.67,730 10,721 6,711C2,701 0,691 0,681C0,670.33 2,660.17 6,650.5C10,640.83 15.67,632.33 23,625L150,498C165.33,482.67 184.33,474.83 207,474.5C229.67,474.17 248.67,481.67 264,497L314,547L342,519L292,469C276.67,453.67 269,435 269,413C269,391 276.67,372.33 292,357L349,300C364.33,284.67 383.17,277 405.5,277C427.83,277 446.67,284.67 462,300L512,350L540,322L490,272C474.67,256.67 467,237.83 467,215.5C467,193.17 474.67,174.33 490,159L617,32C625,24 634,18 644,14C654,10 664,8 674,8C684,8 693.83,10 703.5,14C713.17,18 722,24 730,32L872,174C880,181.33 885.83,189.83 889.5,199.5C893.17,209.17 895,219.33 895,230C895,240 893.17,250 889.5,260C885.83,270 880,279 872,287L745,414C729.67,429.33 710.83,437 688.5,437C666.17,437 647.33,429.33 632,414L582,364L554,392L604,442C619.33,457.33 626.83,476.17 626.5,498.5C626.17,520.83 618.33,539.67 603,555L547,611C531.67,626.33 512.83,634 490.5,634C468.17,634 449.33,626.33 434,611L384,561L356,589L406,639C421.33,654.33 428.83,673.33 428.5,696C428.17,718.67 420.33,737.67 405,753L278,880C270.67,887.33 262.17,893 252.5,897C242.83,901 232.67,903 222,903ZM560,768L560,688C593.33,688 621.67,676.33 645,653C668.33,629.67 680,601.33 680,568L760,568C760,623.33 740.5,670.5 701.5,709.5C662.5,748.5 615.33,768 560,768Z"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="24dp" | ||
android:height="24dp" | ||
android:viewportWidth="960" | ||
android:viewportHeight="960" | ||
android:tint="?attr/colorControlNormal"> | ||
<path | ||
android:fillColor="@android:color/white" | ||
android:pathData="M80,880L880,80L880,880L80,880ZM273,800L800,800L800,274L273,800Z"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="24dp" | ||
android:height="24dp" | ||
android:viewportWidth="960" | ||
android:viewportHeight="960" | ||
android:tint="?attr/colorControlNormal"> | ||
<path | ||
android:fillColor="@android:color/white" | ||
android:pathData="M80,880L880,80L880,880L80,880ZM400,800L800,800L800,274L400,674L400,800Z"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="24dp" | ||
android:height="24dp" | ||
android:viewportWidth="960" | ||
android:viewportHeight="960" | ||
android:tint="?attr/colorControlNormal"> | ||
<path | ||
android:fillColor="@android:color/white" | ||
android:pathData="M80,880L880,80L880,880L80,880ZM520,800L800,800L800,274L520,554L520,800Z"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="24dp" | ||
android:height="24dp" | ||
android:viewportWidth="960" | ||
android:viewportHeight="960" | ||
android:tint="?attr/colorControlNormal"> | ||
<path | ||
android:fillColor="@android:color/white" | ||
android:pathData="M80,880L880,80L880,880L80,880ZM600,800L800,800L800,274L600,474L600,800Z"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="24dp" | ||
android:height="24dp" | ||
android:viewportWidth="960" | ||
android:viewportHeight="960" | ||
android:tint="?attr/colorControlNormal"> | ||
<path | ||
android:fillColor="@android:color/white" | ||
android:pathData="M80,880L880,80L880,880L80,880Z"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters