Many recent changes
This commit is contained in:
parent
10e10d5814
commit
b876b7b58e
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="fishrungames.bashgid"
|
||||
android:versionCode="4"
|
||||
android:versionName="1.03" >
|
||||
android:versionCode="9"
|
||||
android:versionName="1.08" >
|
||||
|
||||
<uses-feature
|
||||
android:glEsVersion="0x00020000"
|
||||
|
@ -11,6 +11,7 @@
|
||||
android:id="@+id/dateTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="TextView" />
|
||||
android:text="TextView"
|
||||
android:textSize="@dimen/article_content_text_size" />
|
||||
|
||||
</LinearLayout>
|
||||
|
19
android/res/layout/article_title_element.xml
Normal file
19
android/res/layout/article_title_element.xml
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/LinearLayout1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/light_grey_1"
|
||||
android:orientation="vertical"
|
||||
android:showDividers="middle" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dateTextView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="TextView"
|
||||
android:textSize="@dimen/xxlarge_text_size"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
@ -2,6 +2,9 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingBottom="@dimen/large_margin"
|
||||
android:paddingLeft="@dimen/large_margin"
|
||||
android:paddingRight="@dimen/large_margin"
|
||||
android:background="@color/bkg2"
|
||||
android:orientation="vertical" >
|
||||
<ProgressBar
|
||||
@ -12,7 +15,7 @@
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:indeterminate="true" />
|
||||
|
||||
<GridView
|
||||
<fishrungames.bashgid.StaticGridView
|
||||
android:id="@+id/gridView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
@ -12,6 +12,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/bkg2"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<TextView
|
||||
|
@ -1,4 +1,4 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@ -7,6 +7,11 @@
|
||||
android:padding="@dimen/large_margin"
|
||||
tools:context="fishrungames.bashgid.WelcomeFragment" >
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/logo_view"
|
||||
android:layout_width="match_parent"
|
||||
@ -20,7 +25,6 @@
|
||||
android:id="@+id/flag_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="bottom"
|
||||
android:baselineAligned="false"
|
||||
android:gravity="bottom" >
|
||||
|
||||
@ -52,7 +56,6 @@
|
||||
android:onClick="OnSelectEnglish"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/united_states_icon_button" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@ -83,7 +86,6 @@
|
||||
android:onClick="OnSelectRussian"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/russia_icon_button" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@ -114,10 +116,9 @@
|
||||
android:onClick="OnSelectChinese"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/china_icon_button" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -9,7 +9,7 @@
|
||||
android:orientation="vertical"
|
||||
android:showDividers="middle" >
|
||||
|
||||
<ImageView
|
||||
<fishrungames.bashgid.SquareImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -25,7 +25,7 @@
|
||||
android:layout_gravity="clip_vertical"
|
||||
android:layout_margin="@dimen/medium_margin"
|
||||
android:text="dsdsd"
|
||||
android:textSize="@dimen/large_text_size"
|
||||
android:textSize="@dimen/small_text_size"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -51,7 +51,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical|center_horizontal"
|
||||
android:background="@drawable/transparent"
|
||||
android:background="@color/button_default"
|
||||
android:src="@drawable/ic_action_refresh" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -27,7 +27,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical|center_horizontal"
|
||||
android:background="@drawable/transparent"
|
||||
android:background="@color/button_default"
|
||||
android:src="@drawable/ic_action_refresh" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -28,7 +28,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical|center_horizontal"
|
||||
android:background="@drawable/transparent"
|
||||
android:background="@color/button_default"
|
||||
android:src="@drawable/ic_action_refresh" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -27,29 +27,11 @@
|
||||
<dimen name="small_margin">4dp</dimen>
|
||||
|
||||
|
||||
<dimen name="xxlarge_text_size">40sp</dimen>
|
||||
<dimen name="xlarge_text_size">30sp</dimen>
|
||||
|
||||
<dimen name="large_text_size">24sp</dimen>
|
||||
|
||||
<dimen name="medium_text_size">20sp</dimen>
|
||||
|
||||
<dimen name="small_text_size">18sp</dimen>
|
||||
|
||||
<dimen name="xsmall_text_size">14sp</dimen>
|
||||
|
||||
|
||||
<dimen name="language_text_size">30sp</dimen>
|
||||
|
||||
<dimen name="article_content_text_size">20sp</dimen>
|
||||
|
||||
|
||||
|
||||
|
||||
<dimen name="grid_view_horizontal_spacing">12dp</dimen>
|
||||
<dimen name="grid_view_vertical_spacing">12dp</dimen>
|
||||
|
||||
<dimen name="logo_height">240dp</dimen>
|
||||
<dimen name="logo_height">160dp</dimen>
|
||||
|
||||
<dimen name="logo_margin_top">24dp</dimen>
|
||||
|
||||
|
@ -27,29 +27,13 @@
|
||||
<dimen name="small_margin">4dp</dimen>
|
||||
|
||||
|
||||
<dimen name="xxlarge_text_size">30sp</dimen>
|
||||
<dimen name="xlarge_text_size">24sp</dimen>
|
||||
|
||||
<dimen name="large_text_size">24sp</dimen>
|
||||
|
||||
<dimen name="medium_text_size">20sp</dimen>
|
||||
|
||||
<dimen name="small_text_size">18sp</dimen>
|
||||
|
||||
<dimen name="xsmall_text_size">14sp</dimen>
|
||||
|
||||
<dimen name="language_text_size">20sp</dimen>
|
||||
|
||||
<dimen name="article_content_text_size">14sp</dimen>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dimen name="grid_view_horizontal_spacing">12dp</dimen>
|
||||
<dimen name="grid_view_vertical_spacing">12dp</dimen>
|
||||
|
||||
<dimen name="logo_height">240dp</dimen>
|
||||
<dimen name="logo_height">160dp</dimen>
|
||||
|
||||
<dimen name="logo_margin_top">24dp</dimen>
|
||||
|
||||
|
@ -27,26 +27,12 @@
|
||||
<dimen name="small_margin">4dp</dimen>
|
||||
|
||||
|
||||
<dimen name="xxlarge_text_size">30sp</dimen>
|
||||
<dimen name="xlarge_text_size">24sp</dimen>
|
||||
|
||||
<dimen name="large_text_size">24sp</dimen>
|
||||
|
||||
<dimen name="medium_text_size">20sp</dimen>
|
||||
|
||||
<dimen name="small_text_size">18sp</dimen>
|
||||
|
||||
<dimen name="xsmall_text_size">14sp</dimen>
|
||||
|
||||
<dimen name="language_text_size">20sp</dimen>
|
||||
|
||||
<dimen name="article_content_text_size">14sp</dimen>
|
||||
|
||||
|
||||
<dimen name="grid_view_horizontal_spacing">12dp</dimen>
|
||||
<dimen name="grid_view_vertical_spacing">12dp</dimen>
|
||||
|
||||
<dimen name="logo_height">240dp</dimen>
|
||||
<dimen name="logo_height">160dp</dimen>
|
||||
|
||||
<dimen name="logo_margin_top">24dp</dimen>
|
||||
|
||||
|
@ -27,21 +27,6 @@
|
||||
<dimen name="small_margin">4dp</dimen>
|
||||
|
||||
|
||||
<dimen name="xxlarge_text_size">40sp</dimen>
|
||||
<dimen name="xlarge_text_size">30sp</dimen>
|
||||
|
||||
<dimen name="large_text_size">24sp</dimen>
|
||||
|
||||
<dimen name="medium_text_size">20sp</dimen>
|
||||
|
||||
<dimen name="small_text_size">18sp</dimen>
|
||||
|
||||
<dimen name="xsmall_text_size">14sp</dimen>
|
||||
|
||||
|
||||
<dimen name="language_text_size">30sp</dimen>
|
||||
|
||||
<dimen name="article_content_text_size">20sp</dimen>
|
||||
|
||||
|
||||
|
||||
@ -49,7 +34,7 @@
|
||||
<dimen name="grid_view_horizontal_spacing">12dp</dimen>
|
||||
<dimen name="grid_view_vertical_spacing">12dp</dimen>
|
||||
|
||||
<dimen name="logo_height">240dp</dimen>
|
||||
<dimen name="logo_height">160dp</dimen>
|
||||
|
||||
<dimen name="logo_margin_top">24dp</dimen>
|
||||
|
||||
|
@ -27,8 +27,8 @@
|
||||
<dimen name="small_margin">4dp</dimen>
|
||||
|
||||
|
||||
<dimen name="xxlarge_text_size">40sp</dimen>
|
||||
<dimen name="xlarge_text_size">30sp</dimen>
|
||||
<dimen name="xxlarge_text_size">36sp</dimen>
|
||||
<dimen name="xlarge_text_size">24sp</dimen>
|
||||
|
||||
<dimen name="large_text_size">24sp</dimen>
|
||||
|
||||
@ -38,10 +38,9 @@
|
||||
|
||||
<dimen name="xsmall_text_size">14sp</dimen>
|
||||
|
||||
<dimen name="language_text_size">20sp</dimen>
|
||||
|
||||
<dimen name="language_text_size">30sp</dimen>
|
||||
|
||||
<dimen name="article_content_text_size">20sp</dimen>
|
||||
<dimen name="article_content_text_size">24sp</dimen>
|
||||
|
||||
|
||||
|
||||
@ -49,7 +48,7 @@
|
||||
<dimen name="grid_view_horizontal_spacing">12dp</dimen>
|
||||
<dimen name="grid_view_vertical_spacing">12dp</dimen>
|
||||
|
||||
<dimen name="logo_height">240dp</dimen>
|
||||
<dimen name="logo_height">160dp</dimen>
|
||||
|
||||
<dimen name="logo_margin_top">24dp</dimen>
|
||||
|
||||
|
@ -330,11 +330,17 @@ public class ArticleFragment extends Fragment
|
||||
View view;
|
||||
if (convertView == null)
|
||||
{ // if it's not recycled, initialize some attributes
|
||||
if (getItemViewType(position) == 0 || getItemViewType(position) == 1)
|
||||
if (getItemViewType(position) == 0)
|
||||
{
|
||||
LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
view = inflater.inflate(R.layout.article_title_element, null);
|
||||
}
|
||||
else if (getItemViewType(position) == 1)
|
||||
{
|
||||
LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
view = inflater.inflate(R.layout.article_text_element, null);
|
||||
} else if (getItemViewType(position) == 2)
|
||||
}
|
||||
else if (getItemViewType(position) == 2)
|
||||
{
|
||||
LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
view = inflater.inflate(R.layout.article_photo_element, null);
|
||||
@ -366,16 +372,17 @@ public class ArticleFragment extends Fragment
|
||||
|
||||
textView.setText(articleLayout.get(position).value);
|
||||
|
||||
/*
|
||||
if (article.type == ArticleManager.ARTICLE_TYPE_NEWS)
|
||||
{
|
||||
textView.setTextSize(getResources().getDimension(R.dimen.large_text_size));
|
||||
} else
|
||||
{
|
||||
textView.setTextSize(getResources().getDimension(R.dimen.xlarge_text_size));
|
||||
}
|
||||
}*/
|
||||
|
||||
textView.setTypeface(null, Typeface.BOLD);
|
||||
textView.setGravity(Gravity.CENTER_HORIZONTAL);
|
||||
//textView.setTypeface(null, Typeface.BOLD);
|
||||
//textView.setGravity(Gravity.CENTER_HORIZONTAL);
|
||||
|
||||
} else if (getItemViewType(position) == 1)
|
||||
{
|
||||
@ -383,9 +390,9 @@ public class ArticleFragment extends Fragment
|
||||
|
||||
textView.setText(articleLayout.get(position).value);
|
||||
|
||||
textView.setTextSize(getResources().getDimension(R.dimen.article_content_text_size));
|
||||
textView.setTypeface(null, Typeface.NORMAL);
|
||||
textView.setGravity(Gravity.LEFT);
|
||||
//textView.setTextSize(getResources().getDimension(R.dimen.article_content_text_size));
|
||||
//textView.setTypeface(null, Typeface.NORMAL);
|
||||
//textView.setGravity(Gravity.LEFT);
|
||||
|
||||
} else if (getItemViewType(position) == 2)
|
||||
{
|
||||
|
@ -325,11 +325,30 @@ public class BashgidApplication extends android.app.Application {
|
||||
}
|
||||
|
||||
public static void DownloadDatabase()
|
||||
{
|
||||
|
||||
if (databaseDownloadTask == null)
|
||||
{
|
||||
if (MainActivity.getInstance() != null)
|
||||
{
|
||||
if (!MainActivity.getInstance().databaseAlreadyLoaded)
|
||||
{
|
||||
ForceDownloadDatabase();
|
||||
|
||||
MainActivity.getInstance().databaseAlreadyLoaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void ForceDownloadDatabase()
|
||||
{
|
||||
|
||||
if (databaseDownloadTask != null)
|
||||
{
|
||||
return;
|
||||
CancelDownloadDatabaseTask();
|
||||
}
|
||||
|
||||
databaseDownloadTask = new DatabaseDownloadTask();
|
||||
@ -520,6 +539,7 @@ public class BashgidApplication extends android.app.Application {
|
||||
return settings.getInt("lastLanguage", 0);
|
||||
}
|
||||
|
||||
|
||||
public static String DateFormattedForLocale(Date date)
|
||||
{
|
||||
return DateUtils.formatDateTime(instance, date.getTime(), DateUtils.FORMAT_ABBREV_ALL | DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_YEAR);
|
||||
|
@ -189,7 +189,7 @@ public class CatalogFragment extends Fragment
|
||||
|
||||
HListView hListView = (HListView) view.findViewById(R.id.hListView);
|
||||
|
||||
hListView.setAdapter(new MainPageHListViewAdapters.JournalElementAdapter(getActivity(), journalList.get(position)));
|
||||
hListView.setAdapter(new MainPageHListViewAdapters.JournalElementAdapter(getActivity(), journalList.get(position), MainActivity.TAG_BACK_TO_CATALOGFRAGMENT));
|
||||
|
||||
textView.setText(journalList.get(position).title);
|
||||
|
||||
|
@ -79,6 +79,8 @@ public class MainActivity extends ActionBarActivity implements NavigationDrawerF
|
||||
|
||||
private int postnotedDrawerSelection = 0;
|
||||
|
||||
public boolean databaseAlreadyLoaded = false;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
@ -433,6 +435,11 @@ public class MainActivity extends ActionBarActivity implements NavigationDrawerF
|
||||
|
||||
public void OpenMainScreen(boolean fromSavedInstanceState)
|
||||
{
|
||||
if (mNavigationDrawerFragment != null)
|
||||
{
|
||||
mNavigationDrawerFragment.selectItemWithoutCall(1);
|
||||
}
|
||||
|
||||
ClearAllFragmentLinks();
|
||||
|
||||
mainPageFragment = new MainPageFragment();
|
||||
@ -452,6 +459,10 @@ public class MainActivity extends ActionBarActivity implements NavigationDrawerF
|
||||
|
||||
public void OpenNewsScreen(boolean fromSavedInstanceState)
|
||||
{
|
||||
if (mNavigationDrawerFragment != null)
|
||||
{
|
||||
mNavigationDrawerFragment.selectItemWithoutCall(2);
|
||||
}
|
||||
|
||||
ClearAllFragmentLinks();
|
||||
|
||||
@ -476,6 +487,11 @@ public class MainActivity extends ActionBarActivity implements NavigationDrawerF
|
||||
public void OpenCatalogScreen(boolean fromSavedInstanceState)
|
||||
{
|
||||
|
||||
if (mNavigationDrawerFragment != null)
|
||||
{
|
||||
mNavigationDrawerFragment.selectItemWithoutCall(3);
|
||||
}
|
||||
|
||||
ClearAllFragmentLinks();
|
||||
|
||||
catalogFragment = new CatalogFragment();
|
||||
@ -489,6 +505,11 @@ public class MainActivity extends ActionBarActivity implements NavigationDrawerF
|
||||
public void OpenJournalScreen(boolean fromSavedInstanceState, String journalName, String tag)
|
||||
{
|
||||
|
||||
if (mNavigationDrawerFragment != null && journalName.equals("investor"))
|
||||
{
|
||||
mNavigationDrawerFragment.selectItemWithoutCall(7);
|
||||
}
|
||||
|
||||
ClearAllFragmentLinks();
|
||||
|
||||
journalFragment = new JournalFragment(journalName);
|
||||
@ -500,6 +521,12 @@ public class MainActivity extends ActionBarActivity implements NavigationDrawerF
|
||||
|
||||
public void OpenSettingsScreen(boolean fromSavedInstanceState)
|
||||
{
|
||||
|
||||
if (mNavigationDrawerFragment != null)
|
||||
{
|
||||
mNavigationDrawerFragment.selectItemWithoutCall(8);
|
||||
}
|
||||
|
||||
ClearAllFragmentLinks();
|
||||
|
||||
|
||||
@ -562,6 +589,10 @@ public class MainActivity extends ActionBarActivity implements NavigationDrawerF
|
||||
|
||||
public void OpenMapScreen(boolean fromSavedInstanceState, String filter, String tag)
|
||||
{
|
||||
if (mNavigationDrawerFragment != null)
|
||||
{
|
||||
mNavigationDrawerFragment.selectItemWithoutCall(4);
|
||||
}
|
||||
ClearAllFragmentLinks();
|
||||
|
||||
mapHolderFragment = new OsmMapHolderFragment(0, filter);
|
||||
@ -572,6 +603,10 @@ public class MainActivity extends ActionBarActivity implements NavigationDrawerF
|
||||
|
||||
public void OpenMapScreen(ArticleFullData articleFullData, String tag)
|
||||
{
|
||||
if (mNavigationDrawerFragment != null)
|
||||
{
|
||||
mNavigationDrawerFragment.selectItemWithoutCall(4);
|
||||
}
|
||||
ClearAllFragmentLinks();
|
||||
|
||||
mapHolderFragment = new OsmMapHolderFragment(articleFullData);
|
||||
@ -582,6 +617,11 @@ public class MainActivity extends ActionBarActivity implements NavigationDrawerF
|
||||
|
||||
public void OpenPhotoAlbumListScreen(boolean fromSavedInstanceState)
|
||||
{
|
||||
if (mNavigationDrawerFragment != null)
|
||||
{
|
||||
mNavigationDrawerFragment.selectItemWithoutCall(6);
|
||||
}
|
||||
|
||||
ClearAllFragmentLinks();
|
||||
|
||||
albumListFragment = new AlbumListFragment();
|
||||
@ -638,6 +678,11 @@ public class MainActivity extends ActionBarActivity implements NavigationDrawerF
|
||||
|
||||
public void OpenVideoListScreen(boolean fromSavedInstanceState, String channelName)
|
||||
{
|
||||
if (mNavigationDrawerFragment != null)
|
||||
{
|
||||
mNavigationDrawerFragment.selectItemWithoutCall(5);
|
||||
}
|
||||
|
||||
ClearAllFragmentLinks();
|
||||
|
||||
videoListFragment = new VideoListFragment(channelName);
|
||||
|
@ -132,7 +132,7 @@ public class MainPageFragment extends Fragment
|
||||
public void onClick(View v)
|
||||
{
|
||||
BashgidApplication.CancelDownloadDatabaseTask();
|
||||
BashgidApplication.DownloadDatabase();
|
||||
BashgidApplication.ForceDownloadDatabase();
|
||||
}
|
||||
});
|
||||
|
||||
@ -384,7 +384,7 @@ public class MainPageFragment extends Fragment
|
||||
|
||||
HListView hListView = (HListView) view.findViewById(R.id.hListView);
|
||||
|
||||
hListView.setAdapter(new MainPageHListViewAdapters.JournalElementAdapter(getActivity(), journalList.get(position)));
|
||||
hListView.setAdapter(new MainPageHListViewAdapters.JournalElementAdapter(getActivity(), journalList.get(position), MainActivity.TAG_BACK_TO_MAINFRAGMENT));
|
||||
|
||||
textView.setText(journalList.get(position).title);
|
||||
|
||||
|
@ -83,10 +83,14 @@ public class MainPageHListViewAdapters
|
||||
|
||||
JournalSemiFullData journal;
|
||||
|
||||
public JournalElementAdapter(Context c, JournalSemiFullData journal)
|
||||
String tag;
|
||||
|
||||
|
||||
public JournalElementAdapter(Context c, JournalSemiFullData journal, String tag)
|
||||
{
|
||||
this.mContext = c;
|
||||
this.journal = journal;
|
||||
this.tag = tag;
|
||||
|
||||
}
|
||||
|
||||
@ -142,8 +146,7 @@ public class MainPageHListViewAdapters
|
||||
@Override
|
||||
public void onClick(View v)
|
||||
{
|
||||
MainActivity.getInstance().OpenArticleScreen(journal.articleArr.get(position).name,
|
||||
MainActivity.TAG_BACK_TO_MAINFRAGMENT);
|
||||
MainActivity.getInstance().OpenArticleScreen(journal.articleArr.get(position).name, tag);
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -274,6 +274,15 @@ public class NavigationDrawerFragment extends Fragment
|
||||
}
|
||||
}
|
||||
|
||||
public void selectItemWithoutCall(int position)
|
||||
{
|
||||
mCurrentSelectedPosition = position;
|
||||
if (mDrawerListView != null)
|
||||
{
|
||||
mDrawerListView.setItemChecked(position, true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach(Activity activity)
|
||||
{
|
||||
|
@ -116,24 +116,12 @@ public class VideoListFragment extends Fragment
|
||||
|
||||
public void OnDatabaseDonwloadProgress(Integer percent)
|
||||
{
|
||||
/*
|
||||
databaseDownloadProgressBar.setProgress(percent);
|
||||
|
||||
if (percent >= 100)
|
||||
{
|
||||
databaseDownloadProgressBar.setVisibility(View.GONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
databaseDownloadProgressBar.setVisibility(View.VISIBLE);
|
||||
}
|
||||
*/
|
||||
if (databaseGetChannelTask == null || percent == 100)
|
||||
{
|
||||
RestoreChannel();
|
||||
}
|
||||
|
||||
//SetJournalList(r.journalList);
|
||||
}
|
||||
|
||||
void RestoreChannel()
|
||||
@ -246,9 +234,6 @@ public class VideoListFragment extends Fragment
|
||||
ImageView imageView = (ImageView)view.findViewById(R.id.imageView);
|
||||
TextView nameTextView = (TextView) view.findViewById(R.id.nameTextView);
|
||||
|
||||
//ImageManager.getInstance().ApplyImageToImageView(imageView, channelFullData.videoRecordArr.get(position).previewImageUrl);
|
||||
|
||||
|
||||
if (channelFullData.videoRecordArr.get(position) != null)
|
||||
{
|
||||
ImageManager.getInstance().ApplySmallImageToImageView(imageView, channelFullData.videoRecordArr.get(position).previewImageUrl);
|
||||
|
Loading…
Reference in New Issue
Block a user