added some svg resources

This commit is contained in:
Mariotaku Lee 2015-05-04 23:53:52 +08:00
parent d88e4902c3
commit e402e161d8
133 changed files with 134 additions and 18 deletions

View File

@ -7,8 +7,12 @@ buildscript {
}
dependencies {
classpath 'com.github.ben-manes:gradle-versions-plugin:0.9'
classpath 'com.android.tools.build:gradle:1.2.1'
classpath 'com.android.tools.build:gradle:1.2.2'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
classpath('fr.avianey.androidsvgdrawable:gradle-plugin:1.0.1') {
// should be excluded to avoid conflict
exclude group: 'xerces'
}
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}

View File

@ -1,7 +1,10 @@
import fr.avianey.androidsvgdrawable.gradle.SvgDrawableTask
import java.text.SimpleDateFormat
apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
apply plugin: "androidsvgdrawable"
apply from: rootProject.file('global.gradle')
apply from: rootProject.file('signing.gradle')
@ -47,7 +50,8 @@ android {
}
sourceSets {
main {
res.srcDirs = [project.file("src/$name/res"), project.file("src/$name/res-localized")]
res.srcDirs = [project.file("src/$name/res"), project.file("src/$name/res-localized"),
project.file("src/$name/res-svg2png")]
}
}
}
@ -99,4 +103,21 @@ dependencies {
compile project(':twidere.component.nyan')
compile fileTree(dir: 'libs/main', include: ['*.jar'])
// googleCompile fileTree(dir: 'libs/google', include: ['*.jar'])
}
task svgToPng(type: SvgDrawableTask) {
// specify where to pick SVG from
from = file('src/main/svg-png')
// specify the android res folder
to = file('src/main/res-svg2png')
// create qualified directories if missing
createMissingDirectories = true
// override files only if necessary
overrideMode = 'ifModified'
// let generate PNG for the following densities only
targetedDensities = ['hdpi', 'mdpi', 'xhdpi', 'xxhdpi', 'xxxhdpi']
// relative path of the file specifying nine patch specs
ninePatchConfig = file('src/main/svg-png/9patch.json')
// output format of the generated resources
outputFormat = 'PNG'
}

View File

@ -74,7 +74,7 @@ public abstract class CursorStatusesFragment extends AbsStatusesFragment<Cursor>
showContent();
showEmpty(R.drawable.ic_info_refresh, getString(R.string.swipe_down_to_refresh));
} else {
showError(R.drawable.ic_info_account, getString(R.string.no_account_selected));
showError(R.drawable.ic_info_accounts, getString(R.string.no_account_selected));
}
}

View File

@ -160,7 +160,7 @@ public class DirectMessagesFragment extends AbsContentRecyclerViewFragment<Messa
if (accountIds.length > 0) {
showContent();
} else {
showError(R.drawable.ic_info_account, getString(R.string.no_account_selected));
showError(R.drawable.ic_info_accounts, getString(R.string.no_account_selected));
}
}

View File

@ -199,7 +199,7 @@ public class DraftsFragment extends BaseSupportFragment implements Constants, Lo
mListView.setOnItemClickListener(this);
mListView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE_MODAL);
mListView.setMultiChoiceModeListener(this);
mEmptyIcon.setImageResource(R.drawable.ic_info_drafts);
mEmptyIcon.setImageResource(R.drawable.ic_info_draft);
mEmptyText.setText(R.string.drafts_hint_messages);
getLoaderManager().initLoader(0, null, this);
setListShown(false);

View File

@ -128,6 +128,8 @@ import java.util.Locale;
import edu.tsinghua.spice.Utilies.SpiceProfilingUtil;
import edu.tsinghua.spice.Utilies.TypeMappingUtil;
import twitter4j.Paging;
import twitter4j.Twitter;
import twitter4j.TwitterException;
/**
@ -1008,10 +1010,30 @@ public class StatusFragment extends BaseSupportFragment implements LoaderCallbac
try {
ParcelableStatus status = params[0];
final long account_id = status.account_id;
while (status.in_reply_to_status_id > 0 && !isCancelled()) {
status = Utils.findStatus(context, account_id, status.in_reply_to_status_id);
publishProgress(status);
list.add(0, status);
if (Utils.isOfficialKeyAccount(context, account_id)) {
final Twitter twitter = Utils.getTwitterInstance(context, account_id, true);
while (status.in_reply_to_status_id > 0 && !isCancelled()) {
status = Utils.findStatusInDatabases(context, account_id, status.in_reply_to_status_id);
publishProgress(status);
list.add(0, status);
}
final Paging paging = new Paging();
paging.setMaxId(status.id);
final List<ParcelableStatus> conversations = new ArrayList<>();
for (twitter4j.Status conversationItem : twitter.showConversation(status.id, paging)) {
if (conversationItem.getId() < status.id) {
final ParcelableStatus pStatus = new ParcelableStatus(conversationItem, account_id, false);
publishProgress(pStatus);
conversations.add(pStatus);
}
}
list.addAll(0, conversations);
} else {
while (status.in_reply_to_status_id > 0 && !isCancelled()) {
status = Utils.findStatus(context, account_id, status.in_reply_to_status_id);
publishProgress(status);
list.add(0, status);
}
}
} catch (final TwitterException e) {
return ListResponse.getListInstance(e);

View File

@ -1171,7 +1171,7 @@ public final class TwidereDataProvider extends ContentProvider implements Consta
// Setup notification
final NotificationCompat.Builder builder = new NotificationCompat.Builder(context);
builder.setAutoCancel(true);
builder.setSmallIcon(R.drawable.ic_stat_direct_message);
builder.setSmallIcon(R.drawable.ic_stat_message);
builder.setTicker(notificationTitle);
builder.setContentTitle(notificationTitle);
builder.setContentText(notificationContent);

Binary file not shown.

After

Width:  |  Height:  |  Size: 580 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 998 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 510 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 949 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 973 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 619 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 692 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 541 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 420 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1012 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 654 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 906 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 562 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 789 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 548 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 933 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 742 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 961 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 669 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 848 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 767 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 549 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 439 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 596 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 945 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 704 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 349 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 637 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 682 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 449 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 883 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 546 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 659 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Some files were not shown because too many files have changed in this diff Show More