added some svg resources
@ -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
|
||||
}
|
||||
|
@ -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'
|
||||
}
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
After Width: | Height: | Size: 580 B |
BIN
twidere/src/main/res-svg2png/drawable-hdpi/ic_action_add.png
Normal file
After Width: | Height: | Size: 313 B |
After Width: | Height: | Size: 265 B |
BIN
twidere/src/main/res-svg2png/drawable-hdpi/ic_action_at.png
Normal file
After Width: | Height: | Size: 998 B |
BIN
twidere/src/main/res-svg2png/drawable-hdpi/ic_action_draft.png
Normal file
After Width: | Height: | Size: 726 B |
BIN
twidere/src/main/res-svg2png/drawable-hdpi/ic_action_home.png
Normal file
After Width: | Height: | Size: 510 B |
BIN
twidere/src/main/res-svg2png/drawable-hdpi/ic_action_web.png
Normal file
After Width: | Height: | Size: 949 B |
BIN
twidere/src/main/res-svg2png/drawable-hdpi/ic_info_accounts.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
twidere/src/main/res-svg2png/drawable-hdpi/ic_info_draft.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
twidere/src/main/res-svg2png/drawable-hdpi/ic_stat_mention.png
Normal file
After Width: | Height: | Size: 973 B |
BIN
twidere/src/main/res-svg2png/drawable-hdpi/ic_stat_message.png
Normal file
After Width: | Height: | Size: 619 B |
BIN
twidere/src/main/res-svg2png/drawable-hdpi/ic_stat_send.png
Normal file
After Width: | Height: | Size: 491 B |
After Width: | Height: | Size: 412 B |
BIN
twidere/src/main/res-svg2png/drawable-mdpi/ic_action_add.png
Normal file
After Width: | Height: | Size: 227 B |
After Width: | Height: | Size: 248 B |
BIN
twidere/src/main/res-svg2png/drawable-mdpi/ic_action_at.png
Normal file
After Width: | Height: | Size: 692 B |
BIN
twidere/src/main/res-svg2png/drawable-mdpi/ic_action_draft.png
Normal file
After Width: | Height: | Size: 541 B |
BIN
twidere/src/main/res-svg2png/drawable-mdpi/ic_action_home.png
Normal file
After Width: | Height: | Size: 420 B |
BIN
twidere/src/main/res-svg2png/drawable-mdpi/ic_action_web.png
Normal file
After Width: | Height: | Size: 640 B |
BIN
twidere/src/main/res-svg2png/drawable-mdpi/ic_info_accounts.png
Normal file
After Width: | Height: | Size: 1012 B |
BIN
twidere/src/main/res-svg2png/drawable-mdpi/ic_info_draft.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
twidere/src/main/res-svg2png/drawable-mdpi/ic_stat_mention.png
Normal file
After Width: | Height: | Size: 673 B |
BIN
twidere/src/main/res-svg2png/drawable-mdpi/ic_stat_message.png
Normal file
After Width: | Height: | Size: 446 B |
BIN
twidere/src/main/res-svg2png/drawable-mdpi/ic_stat_send.png
Normal file
After Width: | Height: | Size: 412 B |
After Width: | Height: | Size: 654 B |
BIN
twidere/src/main/res-svg2png/drawable-xhdpi/ic_action_add.png
Normal file
After Width: | Height: | Size: 266 B |
After Width: | Height: | Size: 279 B |
BIN
twidere/src/main/res-svg2png/drawable-xhdpi/ic_action_at.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
twidere/src/main/res-svg2png/drawable-xhdpi/ic_action_draft.png
Normal file
After Width: | Height: | Size: 906 B |
BIN
twidere/src/main/res-svg2png/drawable-xhdpi/ic_action_home.png
Normal file
After Width: | Height: | Size: 562 B |
BIN
twidere/src/main/res-svg2png/drawable-xhdpi/ic_action_web.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
twidere/src/main/res-svg2png/drawable-xhdpi/ic_info_accounts.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
twidere/src/main/res-svg2png/drawable-xhdpi/ic_info_draft.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
twidere/src/main/res-svg2png/drawable-xhdpi/ic_stat_mention.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
twidere/src/main/res-svg2png/drawable-xhdpi/ic_stat_message.png
Normal file
After Width: | Height: | Size: 789 B |
BIN
twidere/src/main/res-svg2png/drawable-xhdpi/ic_stat_send.png
Normal file
After Width: | Height: | Size: 548 B |
After Width: | Height: | Size: 933 B |
BIN
twidere/src/main/res-svg2png/drawable-xxhdpi/ic_action_add.png
Normal file
After Width: | Height: | Size: 309 B |
After Width: | Height: | Size: 319 B |
BIN
twidere/src/main/res-svg2png/drawable-xxhdpi/ic_action_at.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
twidere/src/main/res-svg2png/drawable-xxhdpi/ic_action_draft.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
twidere/src/main/res-svg2png/drawable-xxhdpi/ic_action_home.png
Normal file
After Width: | Height: | Size: 742 B |
BIN
twidere/src/main/res-svg2png/drawable-xxhdpi/ic_action_web.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.0 KiB |
BIN
twidere/src/main/res-svg2png/drawable-xxhdpi/ic_info_draft.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
twidere/src/main/res-svg2png/drawable-xxhdpi/ic_stat_mention.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
twidere/src/main/res-svg2png/drawable-xxhdpi/ic_stat_message.png
Normal file
After Width: | Height: | Size: 961 B |
BIN
twidere/src/main/res-svg2png/drawable-xxhdpi/ic_stat_send.png
Normal file
After Width: | Height: | Size: 669 B |
After Width: | Height: | Size: 1.2 KiB |
BIN
twidere/src/main/res-svg2png/drawable-xxxhdpi/ic_action_add.png
Normal file
After Width: | Height: | Size: 360 B |
After Width: | Height: | Size: 369 B |
BIN
twidere/src/main/res-svg2png/drawable-xxxhdpi/ic_action_at.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
BIN
twidere/src/main/res-svg2png/drawable-xxxhdpi/ic_action_home.png
Normal file
After Width: | Height: | Size: 848 B |
BIN
twidere/src/main/res-svg2png/drawable-xxxhdpi/ic_action_web.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 3.6 KiB |
BIN
twidere/src/main/res-svg2png/drawable-xxxhdpi/ic_info_draft.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 1.1 KiB |
BIN
twidere/src/main/res-svg2png/drawable-xxxhdpi/ic_stat_send.png
Normal file
After Width: | Height: | Size: 767 B |
Before Width: | Height: | Size: 276 B |
Before Width: | Height: | Size: 135 B |
Before Width: | Height: | Size: 109 B |
Before Width: | Height: | Size: 549 B |
Before Width: | Height: | Size: 366 B |
Before Width: | Height: | Size: 221 B |
Before Width: | Height: | Size: 439 B |
Before Width: | Height: | Size: 596 B |
Before Width: | Height: | Size: 945 B |
Before Width: | Height: | Size: 704 B |
Before Width: | Height: | Size: 304 B |
Before Width: | Height: | Size: 349 B |
Before Width: | Height: | Size: 194 B |
Before Width: | Height: | Size: 93 B |
Before Width: | Height: | Size: 105 B |
Before Width: | Height: | Size: 394 B |
Before Width: | Height: | Size: 278 B |
Before Width: | Height: | Size: 184 B |
Before Width: | Height: | Size: 314 B |
Before Width: | Height: | Size: 637 B |
Before Width: | Height: | Size: 682 B |
Before Width: | Height: | Size: 449 B |
Before Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 237 B |
Before Width: | Height: | Size: 348 B |
Before Width: | Height: | Size: 98 B |
Before Width: | Height: | Size: 111 B |
Before Width: | Height: | Size: 883 B |
Before Width: | Height: | Size: 546 B |
Before Width: | Height: | Size: 302 B |
Before Width: | Height: | Size: 659 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.3 KiB |