bugfix
This commit is contained in:
parent
334fc3df31
commit
5feca56108
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@ -24,7 +24,7 @@
|
|||||||
</value>
|
</value>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" project-jdk-name="9.0" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_9" default="true" project-jdk-name="9.0" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectType">
|
<component name="ProjectType">
|
||||||
|
@ -38,7 +38,7 @@ import twitter4j.conf.ConfigurationBuilder;
|
|||||||
public class TwitterEngine {
|
public class TwitterEngine {
|
||||||
|
|
||||||
private final String TWITTER_CONSUMER_KEY = "0EKRHWYcakpCkl8Lr4OcBFMZb";
|
private final String TWITTER_CONSUMER_KEY = "0EKRHWYcakpCkl8Lr4OcBFMZb";
|
||||||
private final String TWITTER_CONSUMER_SECRET = "TODO";
|
private final String TWITTER_CONSUMER_SECRET = "RQrf0uQus5v7IMuYgdlVeBuLw1ApRJhxcAMM8MyUVRh1nKSxnR";
|
||||||
|
|
||||||
private static TwitterEngine mTwitter;
|
private static TwitterEngine mTwitter;
|
||||||
private static long twitterID = -1L;
|
private static long twitterID = -1L;
|
||||||
|
@ -92,7 +92,7 @@ public class DatabaseAdapter {
|
|||||||
else if(mode == TWEET) {
|
else if(mode == TWEET) {
|
||||||
SQL_GET_HOME = "SELECT * FROM tweet " +
|
SQL_GET_HOME = "SELECT * FROM tweet " +
|
||||||
"INNER JOIN user ON tweet.userID = user.userID"+
|
"INNER JOIN user ON tweet.userID = user.userID"+
|
||||||
" WHERE user.userID = "+id+" AND statusregister < 4 ORDER BY tweetID DESC";
|
" WHERE user.userID = "+id+" ORDER BY tweetID DESC";
|
||||||
}
|
}
|
||||||
else if(mode == FAVT) {
|
else if(mode == FAVT) {
|
||||||
SQL_GET_HOME = "SELECT * FROM tweet " +
|
SQL_GET_HOME = "SELECT * FROM tweet " +
|
||||||
@ -107,10 +107,18 @@ public class DatabaseAdapter {
|
|||||||
}
|
}
|
||||||
Cursor cursor = db.rawQuery(SQL_GET_HOME,null);
|
Cursor cursor = db.rawQuery(SQL_GET_HOME,null);
|
||||||
if(cursor.moveToFirst()) {
|
if(cursor.moveToFirst()) {
|
||||||
do {
|
if(mode == TWEET) {
|
||||||
Tweet tweet = getStatus(cursor);
|
do {
|
||||||
tweetList.add(tweet);
|
Tweet tweet = getStatus(cursor);
|
||||||
} while(cursor.moveToNext() && limit++ < 200);
|
if (tweet.profileflag)
|
||||||
|
tweetList.add(tweet);
|
||||||
|
} while (cursor.moveToNext());
|
||||||
|
} else {
|
||||||
|
do {
|
||||||
|
Tweet tweet = getStatus(cursor);
|
||||||
|
tweetList.add(tweet);
|
||||||
|
} while (cursor.moveToNext() && limit++ < 200);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
cursor.close();
|
cursor.close();
|
||||||
return tweetList;
|
return tweetList;
|
||||||
@ -352,7 +360,7 @@ public class DatabaseAdapter {
|
|||||||
links.add(media.substring(0,index));
|
links.add(media.substring(0,index));
|
||||||
media = media.substring(index+1);
|
media = media.substring(index+1);
|
||||||
}
|
}
|
||||||
} while(index >0);
|
} while(index > 0);
|
||||||
String[] result = new String[links.size()];
|
String[] result = new String[links.size()];
|
||||||
return links.toArray(result);
|
return links.toArray(result);
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ import android.widget.Button;
|
|||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
import android.widget.CompoundButton;
|
import android.widget.CompoundButton;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.TextView;
|
import android.widget.NumberPicker;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.flask.colorpicker.ColorPickerView;
|
import com.flask.colorpicker.ColorPickerView;
|
||||||
@ -42,7 +42,6 @@ public class AppSettings extends AppCompatActivity implements View.OnClickListen
|
|||||||
private SharedPreferences settings;
|
private SharedPreferences settings;
|
||||||
private ClipboardManager clip;
|
private ClipboardManager clip;
|
||||||
private Button colorButton1, colorButton2,colorButton3,colorButton4;
|
private Button colorButton1, colorButton2,colorButton3,colorButton4;
|
||||||
private TextView load_factor;
|
|
||||||
private CheckBox toggleImg;
|
private CheckBox toggleImg;
|
||||||
private Dialog d;
|
private Dialog d;
|
||||||
private int row, wId;
|
private int row, wId;
|
||||||
@ -65,13 +64,13 @@ public class AppSettings extends AppCompatActivity implements View.OnClickListen
|
|||||||
colorButton2 = findViewById(R.id.color_font);
|
colorButton2 = findViewById(R.id.color_font);
|
||||||
colorButton3 = findViewById(R.id.color_tweet);
|
colorButton3 = findViewById(R.id.color_tweet);
|
||||||
colorButton4 = findViewById(R.id.highlight_color);
|
colorButton4 = findViewById(R.id.highlight_color);
|
||||||
Button reduce = findViewById(R.id.less);
|
|
||||||
Button enhance = findViewById(R.id.more);
|
|
||||||
Button clipButton = findViewById(R.id.woeid_clip);
|
Button clipButton = findViewById(R.id.woeid_clip);
|
||||||
|
Button load_popup = findViewById(R.id.load_dialog);
|
||||||
toggleImg = findViewById(R.id.toggleImg);
|
toggleImg = findViewById(R.id.toggleImg);
|
||||||
load_factor = findViewById(R.id.number_row);
|
|
||||||
woeId = findViewById(R.id.woeid);
|
woeId = findViewById(R.id.woeid);
|
||||||
|
|
||||||
|
|
||||||
|
load_popup.setOnClickListener(this);
|
||||||
delButton.setOnClickListener(this);
|
delButton.setOnClickListener(this);
|
||||||
errorcall.setOnClickListener(this);
|
errorcall.setOnClickListener(this);
|
||||||
colorButton1.setOnClickListener(this);
|
colorButton1.setOnClickListener(this);
|
||||||
@ -79,8 +78,6 @@ public class AppSettings extends AppCompatActivity implements View.OnClickListen
|
|||||||
colorButton3.setOnClickListener(this);
|
colorButton3.setOnClickListener(this);
|
||||||
colorButton4.setOnClickListener(this);
|
colorButton4.setOnClickListener(this);
|
||||||
toggleImg.setOnCheckedChangeListener(this);
|
toggleImg.setOnCheckedChangeListener(this);
|
||||||
reduce.setOnClickListener(this);
|
|
||||||
enhance.setOnClickListener(this);
|
|
||||||
clipButton.setOnClickListener(this);
|
clipButton.setOnClickListener(this);
|
||||||
|
|
||||||
settings = getSharedPreferences("settings",0);
|
settings = getSharedPreferences("settings",0);
|
||||||
@ -163,20 +160,6 @@ public class AppSettings extends AppCompatActivity implements View.OnClickListen
|
|||||||
setColor(highlight);
|
setColor(highlight);
|
||||||
mode = 3;
|
mode = 3;
|
||||||
break;
|
break;
|
||||||
case R.id.less:
|
|
||||||
if(row > 10) {
|
|
||||||
row -= 10;
|
|
||||||
String out1 = Integer.toString(row);
|
|
||||||
load_factor.setText(out1);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case R.id.more:
|
|
||||||
if(row < 100) {
|
|
||||||
row += 10;
|
|
||||||
String out2 = Integer.toString(row);
|
|
||||||
load_factor.setText(out2);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case R.id.woeid_clip:
|
case R.id.woeid_clip:
|
||||||
if(clip != null && clip.hasPrimaryClip()) {
|
if(clip != null && clip.hasPrimaryClip()) {
|
||||||
String text = clip.getPrimaryClip().getItemAt(0).getText().toString();
|
String text = clip.getPrimaryClip().getItemAt(0).getText().toString();
|
||||||
@ -187,6 +170,16 @@ public class AppSettings extends AppCompatActivity implements View.OnClickListen
|
|||||||
Toast.makeText(getApplicationContext(),"Falsches Format!",Toast.LENGTH_LONG).show();
|
Toast.makeText(getApplicationContext(),"Falsches Format!",Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
case R.id.load_dialog:
|
||||||
|
Dialog d = new Dialog(this);
|
||||||
|
NumberPicker np = new NumberPicker(this);
|
||||||
|
np.setMaxValue(1000);
|
||||||
|
np.setMinValue(100);
|
||||||
|
np.setValue(row);
|
||||||
|
d.setContentView(np);
|
||||||
|
d.show();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -252,8 +245,6 @@ public class AppSettings extends AppCompatActivity implements View.OnClickListen
|
|||||||
String location = Integer.toString(wId);
|
String location = Integer.toString(wId);
|
||||||
woeId.setText(location);
|
woeId.setText(location);
|
||||||
toggleImg.setChecked(imgEnabled);
|
toggleImg.setChecked(imgEnabled);
|
||||||
String load = Integer.toString(row);
|
|
||||||
load_factor.setText(load);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void save() {
|
private void save() {
|
||||||
|
@ -93,43 +93,15 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="5dp"
|
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<Button
|
||||||
android:id="@+id/number_row"
|
android:id="@+id/load_dialog"
|
||||||
android:layout_width="24dp"
|
style="@style/Widget.AppCompat.Button.Borderless"
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="5dp"
|
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:singleLine="true" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="35dp"
|
||||||
android:orientation="vertical">
|
android:text="@string/load_factor" />
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/more"
|
|
||||||
android:layout_width="16dp"
|
|
||||||
android:layout_height="16dp"
|
|
||||||
android:layout_marginEnd="5dp"
|
|
||||||
android:background="@drawable/plus" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/less"
|
|
||||||
android:layout_width="16dp"
|
|
||||||
android:layout_height="16dp"
|
|
||||||
android:background="@drawable/minus" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/load_text"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/limit" />
|
|
||||||
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
android:id="@+id/toggleImg"
|
android:id="@+id/toggleImg"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user