Input type changed to number in some Tag Editor fields
This commit is contained in:
parent
9ba8a07383
commit
8dc3fe130f
5 changed files with 25 additions and 22 deletions
|
|
@ -25,12 +25,6 @@ public class AlbumJSONStore extends SQLiteOpenHelper {
|
||||||
|
|
||||||
public static void deleteDatabase(final Context context) {
|
public static void deleteDatabase(final Context context) {
|
||||||
context.deleteDatabase(DATABASE_NAME);
|
context.deleteDatabase(DATABASE_NAME);
|
||||||
} @Override
|
|
||||||
public void onCreate(final SQLiteDatabase db) {
|
|
||||||
db.execSQL("CREATE TABLE IF NOT EXISTS " + AlbumJSONColumns.NAME +
|
|
||||||
" (" + AlbumJSONColumns.ALBUMANDARTIST_NAME + " TEXT NOT NULL," +
|
|
||||||
AlbumJSONColumns.JSON + " TEXT NOT NULL);"
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addAlbumJSON(final String albumAndArtistName, final String JSON) {
|
public void addAlbumJSON(final String albumAndArtistName, final String JSON) {
|
||||||
|
|
@ -49,6 +43,12 @@ public class AlbumJSONStore extends SQLiteOpenHelper {
|
||||||
database.insert(AlbumJSONColumns.NAME, null, values);
|
database.insert(AlbumJSONColumns.NAME, null, values);
|
||||||
database.setTransactionSuccessful();
|
database.setTransactionSuccessful();
|
||||||
database.endTransaction();
|
database.endTransaction();
|
||||||
|
} @Override
|
||||||
|
public void onCreate(final SQLiteDatabase db) {
|
||||||
|
db.execSQL("CREATE TABLE IF NOT EXISTS " + AlbumJSONColumns.NAME +
|
||||||
|
" (" + AlbumJSONColumns.ALBUMANDARTIST_NAME + " TEXT NOT NULL," +
|
||||||
|
AlbumJSONColumns.JSON + " TEXT NOT NULL);"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getAlbumJSON(final String albumAndArtistName) {
|
public String getAlbumJSON(final String albumAndArtistName) {
|
||||||
|
|
@ -76,10 +76,6 @@ public class AlbumJSONStore extends SQLiteOpenHelper {
|
||||||
cursor.close();
|
cursor.close();
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
} @Override
|
|
||||||
public void onUpgrade(final SQLiteDatabase db, final int oldVersion, final int newVersion) {
|
|
||||||
db.execSQL("DROP TABLE IF EXISTS " + AlbumJSONColumns.NAME);
|
|
||||||
onCreate(db);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeItem(final String albumAndArtistName) {
|
public void removeItem(final String albumAndArtistName) {
|
||||||
|
|
@ -94,6 +90,10 @@ public class AlbumJSONStore extends SQLiteOpenHelper {
|
||||||
public static final String NAME = "AlbumJSON";
|
public static final String NAME = "AlbumJSON";
|
||||||
public static final String ALBUMANDARTIST_NAME = "AlbumAndArtistName";
|
public static final String ALBUMANDARTIST_NAME = "AlbumAndArtistName";
|
||||||
public static final String JSON = "JSON";
|
public static final String JSON = "JSON";
|
||||||
|
} @Override
|
||||||
|
public void onUpgrade(final SQLiteDatabase db, final int oldVersion, final int newVersion) {
|
||||||
|
db.execSQL("DROP TABLE IF EXISTS " + AlbumJSONColumns.NAME);
|
||||||
|
onCreate(db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,12 +25,6 @@ public class ArtistJSONStore extends SQLiteOpenHelper {
|
||||||
|
|
||||||
public static void deleteDatabase(final Context context) {
|
public static void deleteDatabase(final Context context) {
|
||||||
context.deleteDatabase(DATABASE_NAME);
|
context.deleteDatabase(DATABASE_NAME);
|
||||||
} @Override
|
|
||||||
public void onCreate(final SQLiteDatabase db) {
|
|
||||||
db.execSQL("CREATE TABLE IF NOT EXISTS " + ArtistJSONColumns.NAME +
|
|
||||||
" (" + ArtistJSONColumns.ARTIST_NAME + " TEXT NOT NULL," +
|
|
||||||
ArtistJSONColumns.JSON + " TEXT NOT NULL);"
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addArtistJSON(final String artistName, final String JSON) {
|
public void addArtistJSON(final String artistName, final String JSON) {
|
||||||
|
|
@ -49,6 +43,12 @@ public class ArtistJSONStore extends SQLiteOpenHelper {
|
||||||
database.insert(ArtistJSONColumns.NAME, null, values);
|
database.insert(ArtistJSONColumns.NAME, null, values);
|
||||||
database.setTransactionSuccessful();
|
database.setTransactionSuccessful();
|
||||||
database.endTransaction();
|
database.endTransaction();
|
||||||
|
} @Override
|
||||||
|
public void onCreate(final SQLiteDatabase db) {
|
||||||
|
db.execSQL("CREATE TABLE IF NOT EXISTS " + ArtistJSONColumns.NAME +
|
||||||
|
" (" + ArtistJSONColumns.ARTIST_NAME + " TEXT NOT NULL," +
|
||||||
|
ArtistJSONColumns.JSON + " TEXT NOT NULL);"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getArtistJSON(final String artistName) {
|
public String getArtistJSON(final String artistName) {
|
||||||
|
|
@ -76,10 +76,6 @@ public class ArtistJSONStore extends SQLiteOpenHelper {
|
||||||
cursor.close();
|
cursor.close();
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
} @Override
|
|
||||||
public void onUpgrade(final SQLiteDatabase db, final int oldVersion, final int newVersion) {
|
|
||||||
db.execSQL("DROP TABLE IF EXISTS " + ArtistJSONColumns.NAME);
|
|
||||||
onCreate(db);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeItem(final String artistName) {
|
public void removeItem(final String artistName) {
|
||||||
|
|
@ -94,6 +90,10 @@ public class ArtistJSONStore extends SQLiteOpenHelper {
|
||||||
public static final String NAME = "ArtistJSON";
|
public static final String NAME = "ArtistJSON";
|
||||||
public static final String ARTIST_NAME = "ArtistName";
|
public static final String ARTIST_NAME = "ArtistName";
|
||||||
public static final String JSON = "JSON";
|
public static final String JSON = "JSON";
|
||||||
|
} @Override
|
||||||
|
public void onUpgrade(final SQLiteDatabase db, final int oldVersion, final int newVersion) {
|
||||||
|
db.execSQL("DROP TABLE IF EXISTS " + ArtistJSONColumns.NAME);
|
||||||
|
onCreate(db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,8 @@ public class ViewPagerTabArtistBioFragment extends AbsViewPagerTabArtistListFrag
|
||||||
try {
|
try {
|
||||||
biography = getResources().getString(R.string.biography_unavailable);
|
biography = getResources().getString(R.string.biography_unavailable);
|
||||||
} catch (IllegalStateException e) {
|
} catch (IllegalStateException e) {
|
||||||
Log.e(TAG, "error while trying to get ressources", e);
|
Log.e(TAG, "error while trying to access resources", e);
|
||||||
biography = "Errorm";
|
biography = "Error";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
strings.clear();
|
strings.clear();
|
||||||
|
|
|
||||||
|
|
@ -130,6 +130,7 @@
|
||||||
android:fontFamily="sans-serif"
|
android:fontFamily="sans-serif"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:hint="@string/year"
|
android:hint="@string/year"
|
||||||
|
android:inputType="numberDecimal"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
||||||
android:textColor="?attr/title_text_color"/>
|
android:textColor="?attr/title_text_color"/>
|
||||||
|
|
|
||||||
|
|
@ -143,6 +143,7 @@
|
||||||
android:fontFamily="sans-serif"
|
android:fontFamily="sans-serif"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:hint="@string/year"
|
android:hint="@string/year"
|
||||||
|
android:inputType="numberDecimal"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
||||||
android:textColor="?attr/title_text_color"/>
|
android:textColor="?attr/title_text_color"/>
|
||||||
|
|
@ -169,6 +170,7 @@
|
||||||
android:fontFamily="sans-serif"
|
android:fontFamily="sans-serif"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:hint="@string/track"
|
android:hint="@string/track"
|
||||||
|
android:inputType="numberDecimal"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
android:textAppearance="@style/TextAppearance.AppCompat.Title"
|
||||||
android:textColor="?attr/title_text_color"/>
|
android:textColor="?attr/title_text_color"/>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue