From 05ebba3aba8ac4f0b708dd6460782a4acae4bbe3 Mon Sep 17 00:00:00 2001 From: NudeDude Date: Sat, 20 Jan 2018 10:55:24 +0100 Subject: [PATCH] Added Picasso library Minor Bugfixes --- .idea/misc.xml | 2 +- .../org/nuclearfog/twidda/MainActivity.java | 23 +++++++++---------- .../twidda/window/TwitterSearch.java | 4 ++-- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index ba7052b8..635999df 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -24,7 +24,7 @@ - + diff --git a/app/src/main/java/org/nuclearfog/twidda/MainActivity.java b/app/src/main/java/org/nuclearfog/twidda/MainActivity.java index fb3f463a..daa58240 100644 --- a/app/src/main/java/org/nuclearfog/twidda/MainActivity.java +++ b/app/src/main/java/org/nuclearfog/twidda/MainActivity.java @@ -274,13 +274,6 @@ public class MainActivity extends AppCompatActivity implements AdapterView.OnIte setSupportActionBar(toolbar); getSupportActionBar().setDisplayShowTitleEnabled(false); - timelineList.setOnItemClickListener(this); - trendList.setOnItemClickListener(this); - mentionList.setOnItemClickListener(this); - timelineReload.setOnRefreshListener(this); - trendReload.setOnRefreshListener(this); - mentionReload.setOnRefreshListener(this); - tabhost.setup(); // Tab #1 TabSpec tab1 = tabhost.newTabSpec("timeline"); @@ -299,6 +292,12 @@ public class MainActivity extends AppCompatActivity implements AdapterView.OnIte tabhost.addTab(tab3); tabhost.setOnTabChangedListener(this); + timelineList.setOnItemClickListener(this); + trendList.setOnItemClickListener(this); + mentionList.setOnItemClickListener(this); + timelineReload.setOnRefreshListener(this); + trendReload.setOnRefreshListener(this); + mentionReload.setOnRefreshListener(this); setTabContent(); } @@ -309,11 +308,11 @@ public class MainActivity extends AppCompatActivity implements AdapterView.OnIte TweetDatabase tweetDeck = new TweetDatabase(con,TweetDatabase.HOME_TL, 0L); TrendDatabase trendDeck = new TrendDatabase(con); TweetDatabase mentDeck = new TweetDatabase(con, TweetDatabase.GET_MENT, 0L); - TimelineAdapter tlAdapt = new TimelineAdapter(this,tweetDeck); - TrendAdapter trendAdp = new TrendAdapter(this,trendDeck); - TimelineAdapter ment = new TimelineAdapter(this, mentDeck); - timelineList.setAdapter(tlAdapt); + TimelineAdapter tlAdap = new TimelineAdapter(this,tweetDeck); + TrendAdapter trendAdp = new TrendAdapter(this,trendDeck); + TimelineAdapter mentAdp = new TimelineAdapter(this, mentDeck); + timelineList.setAdapter(tlAdap); trendList.setAdapter(trendAdp); - mentionList.setAdapter(ment); + mentionList.setAdapter(mentAdp); } } \ No newline at end of file diff --git a/app/src/main/java/org/nuclearfog/twidda/window/TwitterSearch.java b/app/src/main/java/org/nuclearfog/twidda/window/TwitterSearch.java index bcd9e891..b31054a7 100644 --- a/app/src/main/java/org/nuclearfog/twidda/window/TwitterSearch.java +++ b/app/src/main/java/org/nuclearfog/twidda/window/TwitterSearch.java @@ -49,12 +49,12 @@ public class TwitterSearch extends AppCompatActivity implements AdapterView.OnIt TabHost.TabSpec tab1 = tabhost.newTabSpec("search_result"); tab1.setContent(R.id.searchtweets); - tab1.setIndicator("",getResources().getDrawable(R.drawable.search_result)); + tab1.setIndicator("",getResources().getDrawable(R.drawable.search)); tabhost.addTab(tab1); TabHost.TabSpec tab2 = tabhost.newTabSpec("user_result"); tab2.setContent(R.id.searchusers); - tab2.setIndicator("",getResources().getDrawable(R.drawable.user_result)); + tab2.setIndicator("",getResources().getDrawable(R.drawable.user)); tabhost.addTab(tab2); tabhost.setOnTabChangedListener(this);