Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Android

A little help implementing a theme on an app. (Linphone)

So I have been working the last week or so on getting Linphone compiled and working. You can find the repository here. https://github.com/BelledonneCommunications/linphone-android. It compiles and works and I’ve spent the last week re-skining it and its coming along nicely. However the default setting menu was in Halo.Dark and I changed it to use Halo.Light and everything worked fine except one section of the settings menu where the current user shows didn’t seem to theme over. Rather than being dark text on a light background its white text on a light background. I can’t quite figure it out. I thought maybe it was a partial or a fragment being set in the menu and overridden somewhere but I cannot find a single layout or view file associated with that part of it.

As you can see in the screenshot its white text on a light background (next to the red dot)

Screenshot

In fact the only file that references it is the settings fragment.java file and I thought maybe I could override where ever it is setting its color from here in the .java file but thus far no luck.

private void initAccounts() {
   PreferenceCategory accounts = (PreferenceCategory) findPreference(getString(R.string.pref_sipaccounts_key));
   accounts.removeAll();

   // Get already configured extra accounts
   int defaultAccountID = mPrefs.getDefaultAccountIndex();
   int nbAccounts = mPrefs.getAccountCount();
   for (int i = 0; i < nbAccounts; i++) {
      final int accountId = i;
      // For each, add menus to configure it
      String username = mPrefs.getAccountUsername(accountId);
      String domain = mPrefs.getAccountDomain(accountId);
      LedPreference account = new LedPreference(LinphoneService.instance());

      if (username == null) {
         account.setTitle(getString(R.string.pref_sipaccount));
      } else {
         account.setTitle(username + "@" + domain); //This is the text being populated
      }

      if (defaultAccountID == i) {
         account.setSummary(R.string.default_account_flag); //as is this
      }

      account.setOnPreferenceClickListener(new OnPreferenceClickListener()
      {
         public boolean onPreferenceClick(Preference preference) {
            LinphoneActivity.instance().displayAccountSettings(accountId);
            return false;
         }
      });
      updateAccountLed(account, username, domain, mPrefs.isAccountEnabled(i));
      accounts.addPreference(account);
   }
}

On an unrelated note but equally as frustrating. It is allowing me to use my credentials form my on SIP server yet it seems to be trying to register those credentials on Linphone's server. Does anybody with experience using Linphone know how to disable this, as it is not needed.

Ben Jakuben and @mrengineer13 from hashtagandroid@slack.com have been a great help thus far.