Suppose we have an iOS app with a free version (basic features) and a paid version (additional features). The app may have development and production environment settings e.g. local and cloud server URL. Also, the app source code is maintained in a single Xcode project.

How to manage these multiple configurations when running or archiving the app?

Actually, there is no single way to answer this question. Me… I chose to use multiple targets. I used as many targets as the number of the different configurations.

Next, we shall: 1 — create two targets for free and paid configurations. 2…


You can create lists and cards with material design styles in your Android app, by using the ListView and CardView widgets.

Source Code

https://github.com/bel3arabyapps/ListView-and-CardView

Steps

1Add the Gradle dependencies to your app’s module.

dependencies {

compile ‘com.android.support:cardview-v7:24.2.1’
}

2In your activity layout, add a ListView with a transparent divider

<ListView

android:divider=”@android:color/transparent” />

3Add your CardView layout to the resources.

a. Set the clipToPadding to false.
b. Set the vertical padding, otherwise the card elevation does not appear with API-24.

<LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android"

android:clipToPadding=”false”
android:paddingBottom=”@dimen/cardview_default_elevation”
android:paddingTop=”@dimen/cardview_default_elevation”>
<android.support.v7.widget.CardView
android:layout_width=”match_parent”
android:layout_height=”wrap_content”>
<! — Your item contents →
</android.support.v7.widget.CardView>
</LinearLayout>

4In your activity class, setup your ListView and its adapter.

public class CardsActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {

ListView lvCards = (ListView) findViewById(R.id.list_cards);
CardsAdapter adapter = new CardsAdapter(this);
lvCards.setAdapter(adapter);
}
}

Bel3araby Apps

iOS / Android Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store