cleanup, performance

This commit is contained in:
NudeDude 2018-07-26 21:33:33 +02:00
parent 38f46336df
commit f7635f8db7
5 changed files with 35 additions and 20 deletions

View File

@ -18,13 +18,13 @@ public class GlobalSettings {
private boolean loadImage;
private int row;
private int woeid;
private int woeId;
private GlobalSettings(Context context) {
settings = context.getSharedPreferences("settings",0);
woeid = settings.getInt("world_id",23424829);
woeId = settings.getInt("world_id",23424829);
background_color = settings.getInt("background_color", 0xff0f114a);
highlight_color = settings.getInt("highlight_color", 0xffff00ff);
font_color = settings.getInt("font_color", 0xffffffff);
@ -55,7 +55,7 @@ public class GlobalSettings {
}
public int getWoeId() {
return woeid;
return woeId;
}
public int getRowLimit() {
@ -101,7 +101,7 @@ public class GlobalSettings {
public void setWoeId(int id) {
Editor edit = settings.edit();
edit.putInt("world_id", id);
woeid = id;
woeId = id;
edit.apply();
}

View File

@ -38,7 +38,7 @@ import twitter4j.conf.ConfigurationBuilder;
public class TwitterEngine {
private final String TWITTER_CONSUMER_KEY = "0EKRHWYcakpCkl8Lr4OcBFMZb";
private final String TWITTER_CONSUMER_SECRET = "RQrf0uQus5v7IMuYgdlVeBuLw1ApRJhxcAMM8MyUVRh1nKSxnR";
private final String TWITTER_CONSUMER_SECRET = "xxx";
private static TwitterEngine mTwitter;
private static long twitterID = -1L;

View File

@ -17,12 +17,17 @@
android:layout_height="match_parent"
android:orientation="horizontal">
<ImageView
android:id="@+id/tweetPb"
<android.support.v7.widget.CardView
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_gravity="center_vertical"
android:contentDescription="@string/profile_image" />
android:layout_height="32dp">
<ImageView
android:id="@+id/tweetPb"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_gravity="center_vertical"
android:contentDescription="@string/profile_image" />
</android.support.v7.widget.CardView>
<LinearLayout
android:layout_width="match_parent"

View File

@ -11,12 +11,17 @@
android:orientation="horizontal"
android:padding="5dp">
<ImageView
android:id="@+id/user_profileimg"
<android.support.v7.widget.CardView
android:layout_width="48dp"
android:layout_height="48dp"
android:contentDescription="@string/profile_image"
android:padding="5dp" />
android:layout_height="48dp">
<ImageView
android:id="@+id/user_profileimg"
android:layout_width="48dp"
android:layout_height="48dp"
android:contentDescription="@string/profile_image"
android:padding="5dp" />
</android.support.v7.widget.CardView>
<LinearLayout
android:layout_width="match_parent"

View File

@ -40,12 +40,17 @@
android:orientation="horizontal"
android:padding="10dp">
<ImageView
android:id="@+id/profile_img"
<android.support.v7.widget.CardView
android:layout_width="64dp"
android:layout_height="64dp"
android:layout_marginEnd="5dp"
android:contentDescription="@string/profile_image" />
android:layout_height="64dp">
<ImageView
android:id="@+id/profile_img"
android:layout_width="64dp"
android:layout_height="64dp"
android:layout_marginEnd="5dp"
android:contentDescription="@string/profile_image" />
</android.support.v7.widget.CardView>
<LinearLayout
android:layout_width="match_parent"