cleanup
This commit is contained in:
parent
178aa6c440
commit
277f3214f3
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue