Search in sources :

Example 1 with FrameworkZip

use of de.robv.android.xposed.installer.util.FrameworkZips.FrameworkZip in project XposedInstaller by rovo89.

the class StatusInstallerFragment method addZipViews.

private boolean addZipViews(LayoutInflater inflater, ViewGroup root, FrameworkZips.Type type) {
    ViewGroup container = null;
    Set<String> allTitles = FrameworkZips.getAllTitles(type);
    for (String title : allTitles) {
        OnlineFrameworkZip online = FrameworkZips.getOnline(title, type);
        LocalFrameworkZip local = FrameworkZips.getLocal(title, type);
        boolean hasOnline = (online != null);
        boolean hasLocal = (local != null);
        FrameworkZip zip = hasOnline ? online : local;
        boolean isOutdated = zip.isOutdated();
        if (isOutdated && !mShowOutdated) {
            continue;
        }
        if (container == null) {
            View card = inflater.inflate(R.layout.framework_zip_group, root, false);
            TextView tv = (TextView) card.findViewById(android.R.id.title);
            tv.setText(type.title);
            container = (ViewGroup) card.findViewById(android.R.id.content);
            root.addView(card);
        }
        addZipView(inflater, container, zip, hasOnline, hasLocal, isOutdated);
    }
    return !allTitles.isEmpty();
}
Also used : LocalFrameworkZip(de.robv.android.xposed.installer.util.FrameworkZips.LocalFrameworkZip) FrameworkZip(de.robv.android.xposed.installer.util.FrameworkZips.FrameworkZip) OnlineFrameworkZip(de.robv.android.xposed.installer.util.FrameworkZips.OnlineFrameworkZip) ViewGroup(android.view.ViewGroup) LocalFrameworkZip(de.robv.android.xposed.installer.util.FrameworkZips.LocalFrameworkZip) TextView(android.widget.TextView) ImageView(android.widget.ImageView) View(android.view.View) TextView(android.widget.TextView) OnlineFrameworkZip(de.robv.android.xposed.installer.util.FrameworkZips.OnlineFrameworkZip)

Aggregations

View (android.view.View)1 ViewGroup (android.view.ViewGroup)1 ImageView (android.widget.ImageView)1 TextView (android.widget.TextView)1 FrameworkZip (de.robv.android.xposed.installer.util.FrameworkZips.FrameworkZip)1 LocalFrameworkZip (de.robv.android.xposed.installer.util.FrameworkZips.LocalFrameworkZip)1 OnlineFrameworkZip (de.robv.android.xposed.installer.util.FrameworkZips.OnlineFrameworkZip)1