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() {
|
searchQuery.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onQueryTextSubmit(String s) {
|
public boolean onQueryTextSubmit(String s) {
|
||||||
Intent intent = new Intent(getApplicationContext(), SearchPage.class);
|
Intent intent = new Intent(MainActivity.this, SearchPage.class);
|
||||||
intent.putExtra("search", s);
|
intent.putExtra("search", s);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -49,7 +49,7 @@ public class LoginPage extends Activity implements OnClickListener, OnConnect {
|
||||||
if(!twitterPin.trim().isEmpty()) {
|
if(!twitterPin.trim().isEmpty()) {
|
||||||
new Registration(this).execute(twitterPin);
|
new Registration(this).execute(twitterPin);
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(getApplicationContext(), R.string.enter_pin, Toast.LENGTH_LONG).show();
|
Toast.makeText(this, R.string.enter_pin, Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -59,9 +59,9 @@ public class LoginPage extends Activity implements OnClickListener, OnConnect {
|
||||||
String text = clip.getPrimaryClip().getItemAt(0).getText().toString();
|
String text = clip.getPrimaryClip().getItemAt(0).getText().toString();
|
||||||
if(text.matches("\\d++\n?")) {
|
if(text.matches("\\d++\n?")) {
|
||||||
pin.setText(text);
|
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 {
|
} else {
|
||||||
Toast.makeText(getApplicationContext(), R.string.false_format, Toast.LENGTH_LONG).show();
|
Toast.makeText(this, R.string.false_format, Toast.LENGTH_LONG).show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -62,11 +62,11 @@ public class SearchPage extends AppCompatActivity implements UserRecycler.OnItem
|
||||||
|
|
||||||
popup = new Dialog(this);
|
popup = new Dialog(this);
|
||||||
tweetSearch = findViewById(R.id.tweet_result);
|
tweetSearch = findViewById(R.id.tweet_result);
|
||||||
tweetSearch.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
|
tweetSearch.setLayoutManager(new LinearLayoutManager(this));
|
||||||
tweetSearch.setBackgroundColor(background);
|
tweetSearch.setBackgroundColor(background);
|
||||||
|
|
||||||
userSearch = findViewById(R.id.user_result);
|
userSearch = findViewById(R.id.user_result);
|
||||||
userSearch.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
|
userSearch.setLayoutManager(new LinearLayoutManager(this));
|
||||||
userSearch.setBackgroundColor(background);
|
userSearch.setBackgroundColor(background);
|
||||||
|
|
||||||
tweetReload = findViewById(R.id.searchtweets);
|
tweetReload = findViewById(R.id.searchtweets);
|
||||||
|
@ -107,7 +107,7 @@ public class SearchPage extends AppCompatActivity implements UserRecycler.OnItem
|
||||||
searchQuery.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
|
searchQuery.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onQueryTextSubmit(String s) {
|
public boolean onQueryTextSubmit(String s) {
|
||||||
Intent intent = new Intent(getApplicationContext(), SearchPage.class);
|
Intent intent = new Intent(SearchPage.this, SearchPage.class);
|
||||||
intent.putExtra("search", s);
|
intent.putExtra("search", s);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
return true;
|
return true;
|
||||||
|
@ -161,7 +161,7 @@ public class SearchPage extends AppCompatActivity implements UserRecycler.OnItem
|
||||||
if (userAdapter != null) {
|
if (userAdapter != null) {
|
||||||
TwitterUser user = userAdapter.getData().get(position);
|
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("userID", user.userID);
|
||||||
intent.putExtra("username", user.screenname);
|
intent.putExtra("username", user.screenname);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
|
|
|
@ -76,7 +76,7 @@ public class TweetDetail extends AppCompatActivity implements OnClickListener,
|
||||||
View answer = findViewById(R.id.answer_button);
|
View answer = findViewById(R.id.answer_button);
|
||||||
answerReload = findViewById(R.id.answer_reload);
|
answerReload = findViewById(R.id.answer_reload);
|
||||||
answer_list = findViewById(R.id.answer_list);
|
answer_list = findViewById(R.id.answer_list);
|
||||||
answer_list.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
|
answer_list.setLayoutManager(new LinearLayoutManager(this));
|
||||||
favorite.setOnClickListener(this);
|
favorite.setOnClickListener(this);
|
||||||
retweet.setOnClickListener(this);
|
retweet.setOnClickListener(this);
|
||||||
answerReload.setOnRefreshListener(this);
|
answerReload.setOnRefreshListener(this);
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class UserDetail extends AppCompatActivity implements OnItemClicked {
|
||||||
setContentView(R.layout.userpage);
|
setContentView(R.layout.userpage);
|
||||||
|
|
||||||
userList = findViewById(R.id.userlist);
|
userList = findViewById(R.id.userlist);
|
||||||
userList.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
|
userList.setLayoutManager(new LinearLayoutManager(this));
|
||||||
Toolbar toolbar = findViewById(R.id.user_toolbar);
|
Toolbar toolbar = findViewById(R.id.user_toolbar);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
GlobalSettings settings = GlobalSettings.getInstance(this);
|
GlobalSettings settings = GlobalSettings.getInstance(this);
|
||||||
|
|
Loading…
Reference in New Issue