Android Open Source - Flippy-Radio Flippy Info Activity






From Project

Back to project page Flippy-Radio.

License

The source code is released under:

Apache License

If you think the Android project Flippy-Radio listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.bitflippersanonymous.flippy.activity;
/*  www  . j  a  v  a2 s .  c  o m*/
import com.bitflippersanonymous.flippy.R;
import com.bitflippersanonymous.flippy.domain.PlsEntry;
import com.bitflippersanonymous.flippy.domain.PlsEntry.Tags;

import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

public class FlippyInfoActivity extends FlippyBaseActivity {

  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.info);
  }

  // Gets called when service binder is connected
  @Override
  protected void update() {
    super.update();
    
      final PlsEntry entry = getService().getCurrentEntry();
      if ( entry == null )
        return;
      
      //TODO: needs info about the title, current location etc.
/*      
      <string name="welcome_messages">Hello, %1$s! You have %2$d new messages.</string>
      In this example, the format string has two arguments: %1$s is a string and %2$d is a decimal number. You can format the string with arguments from your application like this:
      Resources res = getResources();
      String text = String.format(res.getString(R.string.welcome_messages), username, mailCount);
      
      String desc = TextUtils.htmlEncode(entry.get(Tags.description));
      
      final String description = "<html><body bgcolor='#CCCCCC'>" + desc + "</body></html>";
    WebView webview = (WebView) findViewById(R.id.webViewInfo);
    webview.setBackgroundColor(getResources().getColor(R.color.infoBackground));
    webview.loadData(description, "text/html", "utf-8");
    */
         TextView viewInfo = (TextView) findViewById(R.id.viewInfo);
      viewInfo.setText(entry.get(Tags.description));
  }
  
  // Invoked via reflection in MainActivity
  public static void popMenuView(View view) {
    ImageView icon = (ImageView) view.findViewById(R.id.EntryIcon);
    icon.setImageDrawable(view.getContext().getResources().getDrawable(R.drawable.info));
    TextView title = (TextView) view.findViewById(R.id.entryTitle);
    title.setText(view.getResources().getString(R.string.info_menu));
  }

}




Java Source Code List

.PlsAdapter.java
com.bitflippersanonymous.flippy.activity.FlippyAboutActivity.java
com.bitflippersanonymous.flippy.activity.FlippyBaseActivity.java
com.bitflippersanonymous.flippy.activity.FlippyBrowseActivity.java
com.bitflippersanonymous.flippy.activity.FlippyInfoActivity.java
com.bitflippersanonymous.flippy.activity.FlippyMainActivity.java
com.bitflippersanonymous.flippy.activity.FlippyQueueActivity.java
com.bitflippersanonymous.flippy.activity.FlippySearchActivity.java
com.bitflippersanonymous.flippy.activity.FlippySettingsActivity.java
com.bitflippersanonymous.flippy.db.FlippyDatabaseAdapter.java
com.bitflippersanonymous.flippy.db.FlippyDatabaseHelper.java
com.bitflippersanonymous.flippy.domain.EntryView.java
com.bitflippersanonymous.flippy.domain.PlsDbAdapter.java
com.bitflippersanonymous.flippy.domain.PlsEntry.java
com.bitflippersanonymous.flippy.domain.PodcastParser.java
com.bitflippersanonymous.flippy.domain.SimpleCursorLoader.java
com.bitflippersanonymous.flippy.service.FlippyPlayerService.java
com.bitflippersanonymous.flippy.util.ActivitySwipeDetector.java
com.bitflippersanonymous.flippy.util.Util.java