Closed dalb8 closed 11 years ago
com.robot is a personal library that allows me to apply custom font to widgets (ie TextView). If you want, you can just remove these imports and replace all com.roboto.TextView by TextView
This isn't necessary as long as your library is also Free Software. Ideally, you would add it is a submodule, so it get be cloned alongside the source and used for building the app.
Not quite: res/layout/activity_main.xml:58: error: No resource identifier found for attribute 'typeface' in package 'fr.simon.marquis.secretcodes'
and
[javac] /home/gerry/fdroiddata/build/fr.simon.marquis.secretcodes/SecretCodes/src/fr/simon/marquis/secretcodes/util/Utils.java:38: error: '.' expected [javac] import RobotoTypefaceManager; [javac] ^ [javac] /home/gerry/fdroiddata/build/fr.simon.marquis.secretcodes/SecretCodes/src/fr/simon/marquis/secretcodes/util/Utils.java:38: error: ';' expected [javac] import RobotoTypefaceManager; [javac] ^ [javac] /home/gerry/fdroiddata/build/fr.simon.marquis.secretcodes/SecretCodes/src/fr/simon/marquis/secretcodes/util/Utils.java:40: error: class, interface, or enum expected [javac] import fr.simon.marquis.secretcodes.model.SecretCode; [javac] ^ [javac] 3 errors
and a little bit more Custom Typeface code needs removing.But easily fixed with this:
diff --git a/SecretCodes/project.properties b/SecretCodes/project.properties
index 647bacb..3eae809 100644
--- a/SecretCodes/project.properties
+++ b/SecretCodes/project.properties
@@ -12,5 +12,4 @@
# Project target.
target=android-18
-android.library.reference.1=../../../../../adt-bundle-windows/sdk/extras/android/support/v7/appcompat
-android.library.reference.2=../../Roboto
+android.library.reference.1=../../srclib/Support-v7/v7/appcompat
diff --git a/SecretCodes/res/layout/activity_main.xml b/SecretCodes/res/layout/activity_main.xml
index f84a6af..efe9064 100644
--- a/SecretCodes/res/layout/activity_main.xml
+++ b/SecretCodes/res/layout/activity_main.xml
@@ -55,7 +55,7 @@
android:alpha="0.3"
android:src="@drawable/ic_empty_view" />
- <com.roboto.RobotoTextView
+ <TextView
android:id="@+id/emptyViewText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -63,7 +63,7 @@
android:gravity="center"
android:text="@string/action_start"
android:textAppearance="?android:attr/textAppearanceLarge"
- app:typeface="robotoslab_regular" />
+ />
</LinearLayout>
<LinearLayout
@@ -75,4 +75,4 @@
android:orientation="vertical" >
</LinearLayout>
-</RelativeLayout>
\ No newline at end of file
+</RelativeLayout>
diff --git a/SecretCodes/res/layout/dialog_about.xml b/SecretCodes/res/layout/dialog_about.xml
index 7caf943..b0adb1b 100644
--- a/SecretCodes/res/layout/dialog_about.xml
+++ b/SecretCodes/res/layout/dialog_about.xml
@@ -21,7 +21,7 @@
android:orientation="vertical"
android:showDividers="middle" >
- <com.roboto.RobotoTextView
+ <TextView
android:id="@+id/app_name_and_version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -33,14 +33,14 @@
android:drawablePadding="8dp"
android:gravity="center_vertical"
android:textSize="24sp"
- app:typeface="robotoslab_bold" />
+ />
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" >
- <com.roboto.RobotoTextView
+ <TextView
android:id="@+id/about_body"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -48,7 +48,7 @@
android:padding="16dp"
android:textIsSelectable="true"
android:textSize="16sp"
- app:typeface="robotoslab_regular" />
+ />
</ScrollView>
-</LinearLayout>
\ No newline at end of file
+</LinearLayout>
diff --git a/SecretCodes/res/layout/row_code.xml b/SecretCodes/res/layout/row_code.xml
index 6cffbe1..0f5e391 100644
--- a/SecretCodes/res/layout/row_code.xml
+++ b/SecretCodes/res/layout/row_code.xml
@@ -47,7 +47,7 @@
android:layout_toRightOf="@id/item_image"
android:orientation="vertical" >
- <com.roboto.RobotoTextView
+ <TextView
android:id="@+id/item_code"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -55,9 +55,9 @@
android:ellipsize="end"
android:lines="1"
android:textAppearance="?android:attr/textAppearanceMedium"
- app:typeface="robotoslab_regular" />
+ />
- <com.roboto.RobotoTextView
+ <TextView
android:id="@+id/item_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -66,8 +66,8 @@
android:lines="1"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@android:color/tertiary_text_light"
- app:typeface="robotoslab_light" />
+ />
</LinearLayout>
</RelativeLayout>
-</LinearLayout>
\ No newline at end of file
+</LinearLayout>
diff --git a/SecretCodes/src/fr/simon/marquis/secretcodes/ui/MainActivity.java b/SecretCodes/src/fr/simon/marquis/secretcodes/ui/MainActivity.java
index 86592c3..3058172 100644
--- a/SecretCodes/src/fr/simon/marquis/secretcodes/ui/MainActivity.java
+++ b/SecretCodes/src/fr/simon/marquis/secretcodes/ui/MainActivity.java
@@ -86,7 +86,6 @@ public class MainActivity extends ActionBarActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
supportRequestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
- getSupportActionBar().setTitle(Utils.applyCustomTypeFace(getString(R.string.app_name), this));
setContentView(R.layout.activity_main);
View emptyView = findViewById(R.id.emptyView);
mGridView = (GridView) findViewById(R.id.gridView);
diff --git a/SecretCodes/src/fr/simon/marquis/secretcodes/util/Utils.java b/SecretCodes/src/fr/simon/marquis/secretcodes/util/Utils.java
index 84c199e..b50dc35 100644
--- a/SecretCodes/src/fr/simon/marquis/secretcodes/util/Utils.java
+++ b/SecretCodes/src/fr/simon/marquis/secretcodes/util/Utils.java
@@ -31,12 +31,8 @@ import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.preference.PreferenceManager;
-import android.text.Spannable;
-import android.text.SpannableString;
import android.util.Log;
-import com.roboto.RobotoTypefaceManager;
-
import fr.simon.marquis.secretcodes.model.SecretCode;
public class Utils {
@@ -119,11 +115,5 @@ public class Utils {
return false;
}
- public static SpannableString applyCustomTypeFace(CharSequence src, Context ctx) {
- SpannableString span = new SpannableString(src);
-
- span.setSpan(new CustomTypefaceSpan("", RobotoTypefaceManager.obtaintTypeface(ctx, RobotoTypefaceManager.ROBOTOSLAB_REGULAR)), 0,
- span.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
- return span;
- }
+
}
I've just seen that you posted on f-droid.org. They tend to reject anything missing code but if you supply this file and the above patch to https://gitorious.org/f-droid, they'll accept it. Alternatively, use a separate branch for simple fonts:
Categories:System
License:Apache2
Source Code:https://github.com/SimonMarquis/Android-SecretCodes
Issue Tracker:https://github.com/SimonMarquis/Android-SecretCodes/issues
Auto Name:Secret Codes
Summary:Show secret USSDs
Description:
.
Repo Type:git
Repo:https://github.com/SimonMarquis/Android-SecretCodes.git
Build:1.1,5
commit=7488
subdir=SecretCodes
rm=SecretCodes/assets
srclibs=Support-v7@android-4.3_r2.1
patch=fonts_5.patch
prebuild=mv libs/android-support-v4.jar $$Support-v7$$/libs/
Auto Update Mode:None
Update Check Mode:RepoManifest
Current Version:1.1
Current Version Code:5
The Preferences app is similar but a bit trickier. Tags should be uses to mark releases though, as they could publish n'importe quoi otherwise.
Build:1.4,15
commit=b3d8533ace17
subdir=PreferencesManager
rm=PreferencesManager/assets;Resources;PreferencesManager/libs/rootfw.jar
srclibs=Support-v7@android-4.3_r2.1;RootFW@2_0.3.2;StickyListHeaders-tots@62be7e8a7e547
patch=fonts_15.patch
prebuild=mv libs/android-support-v4.jar $$Support-v7$$/libs/ && \
$$SDK$$/tools/android update project -l $$RootFW$$ -p . && \
$$SDK$$/tools/android update project -l $$StickListHeaders-tots$$ -p
Hello, I decided to compile this but I have no idea what can be com.roboto?