This commit is contained in:
NudeDude 2018-08-16 21:35:55 +02:00
parent 178aa6c440
commit 277f3214f3
5 changed files with 10 additions and 10 deletions

View File

@ -124,7 +124,7 @@ public class MainActivity extends AppCompatActivity implements OnRefreshListener
searchQuery.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
@Override
public boolean onQueryTextSubmit(String s) {
Intent intent = new Intent(getApplicationContext(), SearchPage.class);
Intent intent = new Intent(MainActivity.this, SearchPage.class);
intent.putExtra("search", s);
startActivity(intent);
return false;

View File

@ -49,7 +49,7 @@ public class LoginPage extends Activity implements OnClickListener, OnConnect {
if(!twitterPin.trim().isEmpty()) {
new Registration(this).execute(twitterPin);
} else {
Toast.makeText(getApplicationContext(), R.string.enter_pin, Toast.LENGTH_LONG).show();
Toast.makeText(this, R.string.enter_pin, Toast.LENGTH_LONG).show();
}
break;
@ -59,9 +59,9 @@ public class LoginPage extends Activity implements OnClickListener, OnConnect {
String text = clip.getPrimaryClip().getItemAt(0).getText().toString();
if(text.matches("\\d++\n?")) {
pin.setText(text);
Toast.makeText(getApplicationContext(), R.string.pin_added, Toast.LENGTH_LONG).show();
Toast.makeText(this, R.string.pin_added, Toast.LENGTH_LONG).show();
} else {
Toast.makeText(getApplicationContext(), R.string.false_format, Toast.LENGTH_LONG).show();
Toast.makeText(this, R.string.false_format, Toast.LENGTH_LONG).show();
}
}
break;

View File

@ -62,11 +62,11 @@ public class SearchPage extends AppCompatActivity implements UserRecycler.OnItem
popup = new Dialog(this);
tweetSearch = findViewById(R.id.tweet_result);
tweetSearch.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
tweetSearch.setLayoutManager(new LinearLayoutManager(this));
tweetSearch.setBackgroundColor(background);
userSearch = findViewById(R.id.user_result);
userSearch.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
userSearch.setLayoutManager(new LinearLayoutManager(this));
userSearch.setBackgroundColor(background);
tweetReload = findViewById(R.id.searchtweets);
@ -107,7 +107,7 @@ public class SearchPage extends AppCompatActivity implements UserRecycler.OnItem
searchQuery.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
@Override
public boolean onQueryTextSubmit(String s) {
Intent intent = new Intent(getApplicationContext(), SearchPage.class);
Intent intent = new Intent(SearchPage.this, SearchPage.class);
intent.putExtra("search", s);
startActivity(intent);
return true;
@ -161,7 +161,7 @@ public class SearchPage extends AppCompatActivity implements UserRecycler.OnItem
if (userAdapter != null) {
TwitterUser user = userAdapter.getData().get(position);
intent = new Intent(getApplicationContext(), UserProfile.class);
intent = new Intent(this, UserProfile.class);
intent.putExtra("userID", user.userID);
intent.putExtra("username", user.screenname);
startActivity(intent);

View File

@ -76,7 +76,7 @@ public class TweetDetail extends AppCompatActivity implements OnClickListener,
View answer = findViewById(R.id.answer_button);
answerReload = findViewById(R.id.answer_reload);
answer_list = findViewById(R.id.answer_list);
answer_list.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
answer_list.setLayoutManager(new LinearLayoutManager(this));
favorite.setOnClickListener(this);
retweet.setOnClickListener(this);
answerReload.setOnRefreshListener(this);

View File

@ -38,7 +38,7 @@ public class UserDetail extends AppCompatActivity implements OnItemClicked {
setContentView(R.layout.userpage);
userList = findViewById(R.id.userlist);
userList.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
userList.setLayoutManager(new LinearLayoutManager(this));
Toolbar toolbar = findViewById(R.id.user_toolbar);
setSupportActionBar(toolbar);
GlobalSettings settings = GlobalSettings.getInstance(this);